# Alignement de l''usage Core du modèle physique du DPI vers les ressources FHIR - Data Management with FHIR v0.1.0

 ![](assets/images/aphp-logo.png) 

*  [Accueil](index.md) 
*  [Dictionnaire des données](data-dictionary.md) 
*  [Variables du socle commun **** ](#) 
*  [Acquisition des variables](use-core-variables-acquisition.md) 
*  [Formalisation des variables](use-core-variables-formalization.md) 
*  [Standardisation des variables](use-core-variables-standardization.md) 
 
*  [Health Data Platform **** ](#) 
*  [Architecture fonctionnelle](data-platform-functional-architecture.md) 
*  [Raw layer](data-platform-raw-layer.md) 
*  [Transform layer](data-platform-transform-layer.md) 
*  [Semantic layer](data-platform-semantic-layer.md) 
*  [Share layer](data-platform-share-layer.md) 
 
*  [Guide **** ](#) 
*  [Gestion des données](https://interop.aphp.fr/ig/fhir/core/data-management.html) 
*  [Bonnes pratiques](https://interop.aphp.fr/ig/fhir/core/best-practice.html) 
*  [Processus de standardisation des données](https://interop.aphp.fr/ig/fhir/core/standardization-process.html) 
 
*  [Ressources de conformité](artifacts.md) 
*  [Autres **** ](#) 
*  [Aide](help.md) 
*  [Notes de version](changelog.md) 
*  [Glossaire](glossary.md) 
*  [Télécharger spécifications](downloads.md) 
 

* [Accueil](index.md)
* [Dictionnaire des données](data-dictionary.md)
* [Usages](use-case.md)
* [Variables socles pour les EDSH](use-core-variables.md)
* [Standardisation de données au format FHIR](use-core-variables-process.md)
* [Acquisition des variables](use-core-variables-acquisition.md)
* [Formalisation des variables](use-core-variables-formalization.md)
* [Standardisation des variables](use-core-variables-standardization.md)
* [Evaluation](use-core-variables-evaluation.md)
* [Health Data Platform (démo)](data-platform.md)
* [Architecture fonctionnelle](data-platform-functional-architecture.md)
* [Raw layer](data-platform-raw-layer.md)
* [Transform layer](data-platform-transform-layer.md)
* [Semantic layer](data-platform-semantic-layer.md)
* [Share layer](data-platform-share-layer.md)
* [Autre](other.md)
* [Aide](help.md)
* [Notes de version](changelog.md)
* [Glossaire](glossary.md)
* [Télécharger les spécifications](downloads.md)
* [Artifacts Summary](artifacts.md)
* [CareSite OMOP Table](StructureDefinition-OMOPCareSite.md)
* [Concept OMOP Table](StructureDefinition-OMOPConcept.md)
* [Condition Era OMOP Table](StructureDefinition-OMOPConditionEra.md)
* [Condition Occurrence OMOP Table](StructureDefinition-OMOPConditionOccurrence.md)
* [Cost OMOP Table](StructureDefinition-OMOPCost.md)
* [Death OMOP Table](StructureDefinition-OMOPDeath.md)
* [Device Exposure OMOP Table](StructureDefinition-OMOPDeviceExposure.md)
* [Dose Era OMOP Table](StructureDefinition-OMOPDoseEra.md)
* [Drug Era OMOP Table](StructureDefinition-OMOPDrugEra.md)
* [Drug Occurrence OMOP Table](StructureDefinition-OMOPDrugExposure.md)
* [Electronic Health Record Data Model](StructureDefinition-ehr.md)
* [Episode Event OMOP Table](StructureDefinition-OMOPEpisodeEvent.md)
* [Episode OMOP Table](StructureDefinition-OMOPEpisode.md)
* [Fact Relationship OMOP Table](StructureDefinition-OMOPFactRelationship.md)
* [Location OMOP Table](StructureDefinition-OMOPLocation.md)
* [LogicalBundle](StructureDefinition-LogicalBundle.md)
* [Measurement OMOP Table](StructureDefinition-OMOPMeasurement.md)
* [Note NLP OMOP Table](StructureDefinition-OMOPNoteNLP.md)
* [Note OMOP Table](StructureDefinition-OMOPNote.md)
* [Observation OMOP Table](StructureDefinition-OMOPObservation.md)
* [Observation Period OMOP Table](StructureDefinition-OMOPObservationPeriod.md)
* [Payer Plan Period OMOP Table](StructureDefinition-OMOPPayerPlanPeriod.md)
* [Person OMOP Table](StructureDefinition-OMOPPerson.md)
* [Procedure Occurrence OMOP Table](StructureDefinition-OMOPProcedureOccurrence.md)
* [Provider OMOP Table](StructureDefinition-OMOPProvider.md)
* [Specimen OMOP Table](StructureDefinition-OMOPSpecimen.md)
* [Visit Detail OMOP Table](StructureDefinition-OMOPVisitDetail.md)
* [Visit Occurrence OMOP Table](StructureDefinition-OMOPVisitOccurrence.md)
* [Questionnaire usage Variables socles pour les EDSH](Questionnaire-UsageCore.md)
* [Profil de Claim pour le champ MCO du PMSI](StructureDefinition-DMClaimPMSIMCO.md)
* [Profil de Claim pour le PMSI](StructureDefinition-DMClaimPMSI.md)
* [Résultat de laboratoire](StructureDefinition-DMObservationLaboratoryGeneric.md)
* [Activité physique](StructureDefinition-DMObservationExerciceStatus.md)
* [Alanine aminotransférase (ALAT)](StructureDefinition-DMObservationLaboratoryALAT.md)
* [Aspartate aminotransférase (ASAT)](StructureDefinition-DMObservationLaboratoryASAT.md)
* [Bilirubine conjuguée](StructureDefinition-DMObservationLaboratoryBilirubineConjuguee.md)
* [Bilirubine totale](StructureDefinition-DMObservationLaboratoryBilirubineTotale.md)
* [Condition](StructureDefinition-DMCondition.md)
* [Consommation d'alcool](StructureDefinition-DMObservationAlcoholUseStatus.md)
* [Consommation d'autres drogues](StructureDefinition-DMObservationSubstanceUseStatus.md)
* [Consommation de tabac](StructureDefinition-DMObservationSmokingStatus.md)
* [Encounter](StructureDefinition-DMEncounter.md)
* [Eosinophiles](StructureDefinition-DMObservationLaboratoryEosinophiles.md)
* [Episode of care](StructureDefinition-DMEpisodeOfCare.md)
* [Erythrocytes](StructureDefinition-DMObservationLaboratoryErythrocytes.md)
* [Fonction rénale](StructureDefinition-DMObservationLaboratoryFonctionRenale.md)
* [French branded name Medication](StructureDefinition-FrMedicationUcd.md)
* [French compound Medication](StructureDefinition-FrMedicationCompound.md)
* [French non proprietary name Medication](StructureDefinition-FrMedicationNonproprietaryName.md)
* [French Ucd Part Medication](StructureDefinition-FrMedicationUcdPart.md)
* [Gamma-glutamyl transférase (GGT)](StructureDefinition-DMObservationLaboratoryGGT.md)
* [Glycémie à jeun](StructureDefinition-DMObservationLaboratoryGlycemieAJeun.md)
* [Hématocrite](StructureDefinition-DMObservationLaboratoryHematocrite.md)
* [Hémoglobine](StructureDefinition-DMObservationLaboratoryHemoglobine.md)
* [Hémoglobine glyquée](StructureDefinition-DMObservationLaboratoryHbA1c.md)
* [Leucocytes](StructureDefinition-DMObservationLaboratoryLeucocytes.md)
* [Location](StructureDefinition-DMLocation.md)
* [Lymphocytes](StructureDefinition-DMObservationLaboratoryLymphocytes.md)
* [Monocytes](StructureDefinition-DMObservationLaboratoryMonocytes.md)
* [Neutrophiles](StructureDefinition-DMObservationLaboratoryNeutrophiles.md)
* [Organization](StructureDefinition-DMOrganization.md)
* [Patient](StructureDefinition-DMPatient.md)
* [Phosphatases alcaline](StructureDefinition-DMObservationLaboratoryPAL.md)
* [Plaquettes](StructureDefinition-DMObservationLaboratoryPlaquettes.md)
* [Poids du patient](StructureDefinition-DMObservationBodyWeight.md)
* [Practitioner](StructureDefinition-DMPractitioner.md)
* [PractitionerRole](StructureDefinition-DMPractitionerRole.md)
* [Prescription de médicaments](StructureDefinition-DMMedicationRequest.md)
* [Pression artérielle](StructureDefinition-DMObservationBloodPressure.md)
* [Prise de médicaments](StructureDefinition-DMMedicationAdministration.md)
* [Procedure](StructureDefinition-DMProcedure.md)
* [RUM du PMSI MCO](StructureDefinition-DMClaimRUM.md)
* [Taille du patient](StructureDefinition-DMObservationBodyHeight.md)
* [Taux prothrombine (TP)](StructureDefinition-DMObservationLaboratoryTP.md)
* [Temps de céphaline activée (TCA)](StructureDefinition-DMObservationLaboratoryTCA.md)
* [Urée](StructureDefinition-DMObservationLaboratoryUremie.md)
* [Volume globulaire moyen](StructureDefinition-DMObservationLaboratoryVGM.md)
* [Address](StructureDefinition-DMAddress.md)
* [Range with UCUM quantity units](StructureDefinition-FrRangeUcum.md)
* [Ratio with UCUM quantity units](StructureDefinition-FrRatioUcum.md)
* [SimpleQuantity with UCUM quantity unit](StructureDefinition-FrSimpleQuantityUcum.md)
* [Codage géographique du lieu de résidence pour les RSA du PMSI](StructureDefinition-PmsiCodeGeo.md)
* [Groupe Homogène de Malade](StructureDefinition-DRG.md)
* [Ordre des Item dans un claim](StructureDefinition-ItemRank.md)
* [Source ayant fournie l'information de décès](StructureDefinition-DeathSource.md)
* [Actes CCAM pour le PMSI](ValueSet-CcamVS.md)
* [Blood Pressure Measurement Body Location Precoordinated](ValueSet-BloodPressureMeasurementBodyLocationPrecoodinated.md)
* [Blood Pressure Measurement Method](ValueSet-BloodPressureMeasurementMethod.md)
* [Categorisation des items de claim pour le PMSI MCO](ValueSet-FrMCOClaimItemCategory.md)
* [Exercice Status Type](ValueSet-DMExerciceStatusType.md)
* [French Medicinal product Dose form](ValueSet-FrMpDoseForm.md)
* [French Medicinal Product only](ValueSet-FrMedicinalProductOnly.md)
* [French Route of Administration](ValueSet-FrRouteOfAdministration.md)
* [Height Length Measurement Method](ValueSet-HeightLengthMeasurementMethod.md)
* [Liste des analyses biologiques socle des EDS](ValueSet-DMLaboratory.md)
* [Liste des analyses correspondant à l'estimation du DFG - socle des EDS](ValueSet-DMLaboratoryEstimatedDFG.md)
* [Liste des diagnostiques CIM-10 acceptable en DA pour les PMSI MCO et HAD](ValueSet-CIM10PMSIDA.md)
* [Liste des diagnostiques CIM-10 acceptable en DP pour les PMSI MCO et HAD](ValueSet-CIM10PMSIDP.md)
* [Liste des diagnostiques CIM-10 acceptable en DR pour les PMSI MCO et HAD](ValueSet-CIM10PMSIDR.md)
* [Liste des diagnostiques CIM-10 OMS](ValueSet-CIM10.md)
* [Liste des diagnostiques CIM-10 pour le PMSI](ValueSet-CIM10PMSI.md)
* [Liste des GHM pour le PMSI MCO](ValueSet-GHMVS.md)
* [Liste des status pour l'Observation de consommation de tabac](ValueSet-DMObservationSmokingStatusStatus.md)
* [Liste des unités possibles pour une estimation du débit de filtration glomérulaire - socle des EDS](ValueSet-DMLaboratoryEstimatedDFGUnit.md)
* [Mode d'entré du PMSI MCO](ValueSet-PMSIMCOMDEVS.md)
* [Mode de sortie du PMSI MCO](ValueSet-PMSIMCOMDSVS.md)
* [Smoking status comprehensive](ValueSet-DMSmokingStatusComprehensive.md)
* [Smoking Status Pack Years SCT](ValueSet-DMSmokingStatusPackYearsSCT.md)
* [Smoking Status Type](ValueSet-DMSmokingStatusType.md)
* [Smoking Status Type from LOINC](ValueSet-DMSmokingStatusTypeLOINC.md)
* [ValueSet des codes géographiques de résidence du PMSI](ValueSet-PmsiCodeGeoVs.md)
* [ValueSet des modes d'entrée du DPI](ValueSet-DpiModeIn.md)
* [ValueSet des modes de sortie du DPI](ValueSet-DpiModeOut.md)
* [ValueSet des Sexe administratif du DPI](ValueSet-DpiGenderVS.md)
* [ValueSet des sources d'informations fr sur le statut vital](ValueSet-DeathSourcesVs.md)
* [ValueSet des type fr des claims](ValueSet-FrClaimType.md)
* [ValueSet des type fr des claims](ValueSet-FrMCOClaimSubType.md)
* [ValueSet des types de séjour du DPI](ValueSet-DpiEncounterTypeVS.md)
* [ValueSet of gender of OHDSI](ValueSet-OMOPGender.md)
* [Weight Measurement Method](ValueSet-WeightMeasurementMethod.md)
* [Cadre de facturation dans la réglementation française](CodeSystem-FrClaimType.md)
* [Categorie d'information pour les supporting information](CodeSystem-FrClaimSupInfoCategoryPMSIMCO.md)
* [Categorisation des items de claim pour le PMSI MCO](CodeSystem-FrMCOClaimItemCategory.md)
* [CCAM illustrative](CodeSystem-Ccam.md)
* [CIM 10 PMSI](CodeSystem-CIM10.md)
* [Classification des GHM utilisée pour le groupage des séjours dans le PMSI MCO.](CodeSystem-GHM.md)
* [CodeSystem des lieux de résidence géographique au sens du PMSI](CodeSystem-PmsiCodeGeo.md)
* [DPI Gender](CodeSystem-DpiGender.md)
* [Dpi Mode d'entrée](CodeSystem-DpiModeIn.md)
* [Dpi Mode de sortie](CodeSystem-DpiModeOut.md)
* [DPI Type de séjour](CodeSystem-DpiEncounterType.md)
* [Mode d'entré du PMSI MCO](CodeSystem-PMSIMCOMDE.md)
* [Mode de sortie du PMSI MCO](CodeSystem-PMSIMCOMDS.md)
* [mode PMSI](CodeSystem-FrClaimMode.md)
* [Observational Medical Outcomes Partnership (OMOP)](CodeSystem-dm-omop-cdm-v20240229.md)
* [SNOMED CT Solor Extension Temporary](CodeSystem-SolorTemporary.md)
* [Sources susceptibles d'informer sur le statu vital des patients](CodeSystem-DeathSources.md)
* [Specialités médicales au sens de la Fédération des Spécialités Médicales (FSM)](CodeSystem-SpecialitesMedicalesFSM.md)
* [type de diagnostic du PMSI MCO](CodeSystem-PMSIMCODiagType.md)
* [Transforms EHR logical model data to FHIR Semantic Layer resources using Bundle as container](StructureMap-EHR2FSL.md)
* [Transforms QuestionnaireResponse based on Questionnaire Usage Variables socles into FHIR resources conforming to DM profiles](StructureMap-Q2FSL.md)
* [Alignement de l''expression de besoin vers le modèle physique du DPI dans le cadre de l''usage Core](StructureMap-CoreBusiness2Physical.md)
* [Cette ressource présente les spécifications de l''alignement entre les ressources FHIR vers les tables correspodantes du CDM OMOP.](StructureMap-CoreFHIR2OMOP.md)
* [Mapping FHIR Patient resource to OMOP Death](StructureMap-CoreFHIR2OMOPDeath.md)
* [Mapping Patient resource to Location OMOP Domain](StructureMap-CoreFHIR2OMOPLocation.md)
* [Mapping Observation laboratory resources to Measurement OMOP Domain](StructureMap-CoreFHIR2OMOPMeasurement.md)
* [Mapping FHIR Patient resource to OMOP Person](StructureMap-CoreFHIR2OMOPPerson.md)
* [Cette ressource présente les spécifications de l''alignement entre la ressource `Patient` vers les tables correspodantes du CDM OMOP.](StructureMap-CoreFHIRPatient2OMOP.md)
* [Alignement de l''usage Core du modèle physique du DPI vers les ressources FHIR](StructureMap-CorePhysical2FHIR.md)
* [Mapping simple Observation laboratory resources to Measurement OMOP Domain](StructureMap-CoreSimpleObservation2OMOPMeasurement.md)
* [DPI (local) Gender to HL7 Gender](ConceptMap-dpi-gender-2-hl7-gender.md)
* [DPI Encounter type to Semantic layer](ConceptMap-dpi-encounter-type-2-semantic-layer-encounter-class.md)
* [HL7 Gender to OHDSI Gender](ConceptMap-hl7-gender-to-ohdsi-gender.md)
* [Administration d'albumine de Madame Blanc](MedicationAdministration-albumine-j1-cas-9.md)
* [Administration à J1 de furosemide de Madame Blanc](MedicationAdministration-furosemide-j1-cas-9.md)
* [Administration à J1 de spironolactone de Madame Blanc](MedicationAdministration-spironolactone-j1-cas-9.md)
* [Administration à J2 de furosemide de Madame Blanc](MedicationAdministration-furosemide-j2-cas-9.md)
* [Administration à J2 de spironolactone de Madame Blanc](MedicationAdministration-spironolactone-j2-cas-9.md)
* [ALAT de Madame Blanc](Observation-alat-cas-9.md)
* [Albumine](Medication-albumine.md)
* [ASAT de Madame Blanc](Observation-asat-cas-9.md)
* [Ascite de Madame Blanc](Condition-ascite-cas-9.md)
* [Bilirubine totale de Madame Blanc](Observation-bilirubine-totale-cas-9.md)
* [Cirrhose de Madame Blanc](Condition-cirrhose-cas-9.md)
* [Consommation d'alcool de Madame Blanc](Observation-alcool-cas-9.md)
* [de Madame Blanc](Patient-cas-9.md)
* [Exemple complet (FSL)](Bundle-df9c9a9c-854b-46f4-9687-1fbe40c06540.md)
* [Exemple simple](QuestionnaireResponse-test-usage-core.md)
* [Fibroscopie oeso-gastroduodénale de Madame Blanc](Procedure-fogd-cas-9.md)
* [Furosémide](Medication-furosemide.md)
* [GGT de Madame Blanc](Observation-ggt-cas-9.md)
* [Patient 1 - Madame Dupont](QuestionnaireResponse-cas-1-usage-core.md)
* [Patient 10 - Monsieur David](QuestionnaireResponse-cas-10-usage-core.md)
* [Patient 11 - Madame Doré](QuestionnaireResponse-cas-11-usage-core.md)
* [Patient 2 - Monsieur Martin](QuestionnaireResponse-cas-2-usage-core.md)
* [Patient 3 - Madame Leroy](QuestionnaireResponse-cas-3-usage-core.md)
* [Patient 4 - Monsieur Moreau](QuestionnaireResponse-cas-4-usage-core.md)
* [Patient 5 - Madame Simon](QuestionnaireResponse-cas-5-usage-core.md)
* [Patient 6 - Monsieur Petit](QuestionnaireResponse-cas-6-usage-core.md)
* [Patient 7 - Madame Garcia](QuestionnaireResponse-cas-7-usage-core.md)
* [Patient 8 - Monsieur Roux](QuestionnaireResponse-cas-8-usage-core.md)
* [Patient 9 - Madame Blanc](QuestionnaireResponse-cas-9-usage-core.md)
* [Patient test (Bundle)](Bundle-5616f9ad-61b0-4279-9f41-777228d04665.md)
* [Patient test (Ressource)](Patient-8f005d60-b59b-47f7-b04a-f877378f8d68.md)
* [Phosphatases alcalines de Madame Blanc](Observation-phosphatases-alcalines-cas-9.md)
* [Poids de Madame Blanc](Observation-poids-cas-9.md)
* [Ponction évacuatrice de Madame Blanc](Procedure-ponction-cas-9.md)
* [Prescription d'albumine de Madame Blanc](MedicationRequest-albumine-cas-9.md)
* [Prescription de furosémide de Madame Blanc](MedicationRequest-furosemide-cas-9.md)
* [Prescription de furosémide de Madame Blanc](MedicationRequest-spironolactone-cas-9.md)
* [Spironolactone](Medication-spironolactone.md)
* [Séjour de Madame Blanc](Encounter-sejour-cas-9.md)
* [Taux de prothrombine de Madame Blanc](Observation-tp-cas-9.md)
* [Test simple](Bundle-2abf7f4c-bd1f-431f-a4c8-667cfa425baf.md)
* [Exigences des variables socles pour les Entrepôts de Données de Santé Hospitalier (EDSH)](DocumentReference-CoreExigences.md)

Data Management with FHIR
0.1.0 - ci-build

## StructureMap: Alignement de l''usage Core du modèle physique du DPI vers les ressources FHIR 

| | |
| :--- | :--- |
| *Official URL*:https://interop.aphp.fr/ig/fhir/dm/StructureMap/CorePhysical2FHIR | *Version*:0.1.0 |
| Draft as of 2026-04-16 | *Computable Name*:CorePhysical2FHIR |

 
Alignement de l''usage Core du modèle physique du DPI vers les ressources FHIR 



## Resource Content

```json
{
  "resourceType" : "StructureMap",
  "id" : "CorePhysical2FHIR",
  "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CorePhysical2FHIR",
  "version" : "0.1.0",
  "name" : "CorePhysical2FHIR",
  "title" : "Alignement de l''usage Core du modèle physique du DPI vers les ressources FHIR",
  "status" : "draft",
  "date" : "2026-04-16T14:35:38+00:00",
  "publisher" : "AP-HP",
  "contact" : [{
    "name" : "AP-HP",
    "telecom" : [{
      "system" : "url",
      "value" : "https://aphp.fr"
    }]
  }],
  "description" : "Alignement de l''usage Core du modèle physique du DPI vers les ressources FHIR",
  "jurisdiction" : [{
    "coding" : [{
      "system" : "urn:iso:std:iso:3166",
      "code" : "FR"
    }]
  }],
  "structure" : [{
    "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreDataSet",
    "mode" : "source",
    "alias" : "DataSet"
  },
  {
    "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CorePatient",
    "mode" : "source",
    "alias" : "PatientTable"
  },
  {
    "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreSejour",
    "mode" : "source",
    "alias" : "SejourTable"
  },
  {
    "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreBiology",
    "mode" : "source",
    "alias" : "BiologyTable"
  },
  {
    "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreClinical",
    "mode" : "source",
    "alias" : "ClinicalTable"
  },
  {
    "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreDiag",
    "mode" : "source",
    "alias" : "DiagTable"
  },
  {
    "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreActe",
    "mode" : "source",
    "alias" : "ActeTable"
  },
  {
    "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreAddress",
    "mode" : "source",
    "alias" : "AddressTable"
  },
  {
    "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreMedicationAdm",
    "mode" : "source",
    "alias" : "MedicationAdmTable"
  },
  {
    "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreMedicationPre",
    "mode" : "source",
    "alias" : "MedicationPreTable"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/Bundle",
    "mode" : "target",
    "alias" : "FHIRBundle"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/Patient",
    "mode" : "target",
    "alias" : "FHIRPatient"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/Encounter",
    "mode" : "target",
    "alias" : "FHIREncounter"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/Observation",
    "mode" : "target",
    "alias" : "FHIRObservation"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/Meta",
    "mode" : "target",
    "alias" : "FHIRMeta"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/Procedure",
    "mode" : "target",
    "alias" : "FHIRProcedure"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/Condition",
    "mode" : "target",
    "alias" : "FHIRCondition"
  }],
  "group" : [{
    "name" : "dataSet",
    "typeMode" : "types",
    "input" : [{
      "name" : "srcDataSet",
      "type" : "DataSet",
      "mode" : "source"
    },
    {
      "name" : "tgtBundle",
      "type" : "FHIRBundle",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setId",
      "source" : [{
        "context" : "srcDataSet"
      }],
      "target" : [{
        "context" : "tgtBundle",
        "contextType" : "variable",
        "element" : "id",
        "transform" : "uuid"
      }]
    },
    {
      "name" : "setType",
      "source" : [{
        "context" : "srcDataSet"
      }],
      "target" : [{
        "context" : "tgtBundle",
        "contextType" : "variable",
        "element" : "type",
        "transform" : "copy",
        "parameter" : [{
          "valueString" : "transaction"
        }]
      }]
    },
    {
      "name" : "createPatient",
      "source" : [{
        "context" : "srcDataSet",
        "element" : "patient",
        "variable" : "srcPatient"
      }],
      "target" : [{
        "context" : "tgtBundle",
        "contextType" : "variable",
        "element" : "entry",
        "variable" : "tgtPatientEntry"
      },
      {
        "context" : "tgtPatientEntry",
        "contextType" : "variable",
        "element" : "resource",
        "variable" : "newPatient",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Patient"
        }]
      }],
      "rule" : [{
        "name" : "setPatient",
        "source" : [{
          "context" : "srcPatient"
        }],
        "dependent" : [{
          "name" : "patient",
          "variable" : ["srcPatient", "newPatient"]
        }]
      },
      {
        "name" : "setRequestAndFullUrl",
        "source" : [{
          "context" : "srcPatient"
        }],
        "dependent" : [{
          "name" : "setEntryRequestAndFullUrl",
          "variable" : ["newPatient", "tgtPatientEntry"]
        }]
      },
      {
        "name" : "addPatientAddress",
        "source" : [{
          "context" : "srcDataSet",
          "element" : "address",
          "variable" : "srcAddress",
          "condition" : "patientNi.reference = ('PatientCore/' + %srcPatient.patientNi.toString())"
        }],
        "dependent" : [{
          "name" : "patientAddress",
          "variable" : ["srcAddress", "newPatient"]
        }]
      },
      {
        "name" : "createEncounter",
        "source" : [{
          "context" : "srcDataSet",
          "element" : "sejour",
          "variable" : "srcSejour",
          "condition" : "patientNi.reference = ('PatientCore/' + %srcPatient.patientNi.toString())"
        }],
        "target" : [{
          "context" : "tgtBundle",
          "contextType" : "variable",
          "element" : "entry",
          "variable" : "tgtEncounterEntry"
        },
        {
          "context" : "tgtEncounterEntry",
          "contextType" : "variable",
          "element" : "resource",
          "variable" : "newEncounter",
          "transform" : "create",
          "parameter" : [{
            "valueString" : "Encounter"
          }]
        }],
        "rule" : [{
          "name" : "setEncounter",
          "source" : [{
            "context" : "srcSejour"
          }],
          "dependent" : [{
            "name" : "encounter",
            "variable" : ["srcSejour", "newPatient", "newEncounter"]
          }]
        },
        {
          "name" : "setRequestAndFullUrl",
          "source" : [{
            "context" : "srcSejour"
          }],
          "dependent" : [{
            "name" : "setEntryRequestAndFullUrl",
            "variable" : ["newEncounter", "tgtEncounterEntry"]
          }]
        },
        {
          "name" : "createProcedure",
          "source" : [{
            "context" : "srcDataSet",
            "element" : "acte",
            "variable" : "srcActe",
            "condition" : "sejourNi.reference = ('SejourCore/' + %srcSejour.sejourNi.toString())"
          }],
          "target" : [{
            "context" : "tgtBundle",
            "contextType" : "variable",
            "element" : "entry",
            "variable" : "tgtProcedureEntry"
          },
          {
            "context" : "tgtProcedureEntry",
            "contextType" : "variable",
            "element" : "resource",
            "variable" : "newProcedure",
            "transform" : "create",
            "parameter" : [{
              "valueString" : "Procedure"
            }]
          }],
          "rule" : [{
            "name" : "setProcedure",
            "source" : [{
              "context" : "srcActe"
            }],
            "dependent" : [{
              "name" : "procedure",
              "variable" : ["srcActe", "newPatient", "newEncounter", "newProcedure"]
            }]
          },
          {
            "name" : "setRequestAndFullUrl",
            "source" : [{
              "context" : "srcActe"
            }],
            "dependent" : [{
              "name" : "setEntryRequestAndFullUrl",
              "variable" : ["newProcedure", "tgtProcedureEntry"]
            }]
          }]
        },
        {
          "name" : "createProcedure",
          "source" : [{
            "context" : "srcDataSet",
            "element" : "diag",
            "variable" : "srcDiag",
            "condition" : "sejourNi.reference = ('SejourCore/' + %srcSejour.sejourNi.toString())"
          }],
          "target" : [{
            "context" : "tgtBundle",
            "contextType" : "variable",
            "element" : "entry",
            "variable" : "tgtConditionEntry"
          },
          {
            "context" : "tgtConditionEntry",
            "contextType" : "variable",
            "element" : "resource",
            "variable" : "newCondition",
            "transform" : "create",
            "parameter" : [{
              "valueString" : "Condition"
            }]
          }],
          "rule" : [{
            "name" : "setCondition",
            "source" : [{
              "context" : "srcDiag"
            }],
            "dependent" : [{
              "name" : "condition",
              "variable" : ["srcDiag", "newPatient", "newEncounter", "newCondition"]
            }]
          },
          {
            "name" : "setRequestAndFullUrl",
            "source" : [{
              "context" : "srcDiag"
            }],
            "dependent" : [{
              "name" : "setEntryRequestAndFullUrl",
              "variable" : ["newCondition", "tgtConditionEntry"]
            }]
          }]
        },
        {
          "name" : "createObservation",
          "source" : [{
            "context" : "srcDataSet",
            "element" : "biology",
            "variable" : "srcBiology",
            "condition" : "sejourNi.reference = ('SejourCore/' + %srcSejour.sejourNi.toString())"
          }],
          "target" : [{
            "context" : "tgtBundle",
            "contextType" : "variable",
            "element" : "entry",
            "variable" : "tgtBiologyEntry"
          },
          {
            "context" : "tgtBiologyEntry",
            "contextType" : "variable",
            "element" : "resource",
            "variable" : "newObservation",
            "transform" : "create",
            "parameter" : [{
              "valueString" : "Observation"
            }]
          }],
          "rule" : [{
            "name" : "setBiology",
            "source" : [{
              "context" : "srcBiology"
            }],
            "dependent" : [{
              "name" : "observationBiol",
              "variable" : ["srcBiology", "newPatient", "newEncounter", "newObservation"]
            }]
          },
          {
            "name" : "setRequestAndFullUrl",
            "source" : [{
              "context" : "srcBiology"
            }],
            "dependent" : [{
              "name" : "setEntryRequestAndFullUrl",
              "variable" : ["newObservation", "tgtBiologyEntry"]
            }]
          }]
        }]
      }]
    }]
  },
  {
    "name" : "patient",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcPatient",
      "type" : "PatientTable",
      "mode" : "source"
    },
    {
      "name" : "tgtPatient",
      "type" : "FHIRPatient",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setId",
      "source" : [{
        "context" : "srcPatient"
      }],
      "target" : [{
        "context" : "tgtPatient",
        "contextType" : "variable",
        "element" : "id",
        "transform" : "uuid"
      }]
    },
    {
      "name" : "setMeta",
      "source" : [{
        "context" : "srcPatient",
        "element" : "patientNi",
        "variable" : "srcNi"
      }],
      "target" : [{
        "context" : "tgtPatient",
        "contextType" : "variable",
        "element" : "meta",
        "variable" : "tgtMeta"
      }],
      "dependent" : [{
        "name" : "setPatientMeta",
        "variable" : ["srcNi", "tgtMeta"]
      }],
      "documentation" : "copie la valeur du champ patientNi de la table Patient dans l'élément id de la ressource FHIR Patient"
    },
    {
      "name" : "setHumainName",
      "source" : [{
        "context" : "srcPatient"
      }],
      "target" : [{
        "context" : "tgtPatient",
        "contextType" : "variable",
        "element" : "name",
        "variable" : "tgtPatientName"
      }],
      "dependent" : [{
        "name" : "setHumainName",
        "variable" : ["srcPatient", "tgtPatientName"]
      }]
    },
    {
      "name" : "setHumainNir",
      "source" : [{
        "context" : "srcPatient"
      }],
      "target" : [{
        "context" : "tgtPatient",
        "contextType" : "variable",
        "element" : "identifier",
        "variable" : "tgtPatientIdentifier"
      }],
      "dependent" : [{
        "name" : "setHumainNir",
        "variable" : ["srcPatient", "tgtPatientIdentifier"]
      }]
    },
    {
      "name" : "setGender",
      "source" : [{
        "context" : "srcPatient",
        "element" : "gender",
        "variable" : "srcPatientGender"
      }],
      "target" : [{
        "context" : "tgtPatient",
        "contextType" : "variable",
        "element" : "gender",
        "transform" : "translate",
        "parameter" : [{
          "valueId" : "srcPatientGender"
        },
        {
          "valueString" : "https://interop.aphp.fr/ig/fhir/dm/ConceptMap/DpiGender2Hl7Gender"
        },
        {
          "valueString" : "code"
        }]
      }],
      "documentation" : "traduit la valeur du champ gender de la table Patient dans l'élément gender de la ressource FHIR Patient"
    },
    {
      "name" : "setBirthDate",
      "source" : [{
        "context" : "srcPatient",
        "element" : "birthDate",
        "variable" : "srcPatientBirthDate"
      }],
      "target" : [{
        "context" : "tgtPatient",
        "contextType" : "variable",
        "element" : "birthDate",
        "transform" : "copy",
        "parameter" : [{
          "valueId" : "srcPatientBirthDate"
        }]
      }],
      "documentation" : "copie la valeur du champ birthDate de la table Patient dans l'élément birthDate de la ressource FHIR Patient"
    }]
  },
  {
    "name" : "setPatientMeta",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcNi",
      "mode" : "source"
    },
    {
      "name" : "tgtMeta",
      "type" : "FHIRMeta",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setSource",
      "source" : [{
        "context" : "srcNi"
      }],
      "target" : [{
        "context" : "tgtMeta",
        "contextType" : "variable",
        "element" : "source",
        "transform" : "evaluate",
        "parameter" : [{
          "valueString" : "'https://aphp.fr/fhir/Endpoint/dpi/PatientTable' + '/' + %srcNi.toString()"
        }]
      }]
    }]
  },
  {
    "name" : "setHumainName",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcPatient",
      "type" : "PatientTable",
      "mode" : "source"
    },
    {
      "name" : "tgtPatientName",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setUse",
      "source" : [{
        "context" : "srcPatient"
      }],
      "target" : [{
        "context" : "tgtPatientName",
        "contextType" : "variable",
        "element" : "use",
        "transform" : "copy",
        "parameter" : [{
          "valueString" : "usual"
        }]
      }]
    },
    {
      "name" : "setName",
      "source" : [{
        "context" : "srcPatient",
        "element" : "name",
        "variable" : "srcPatientName"
      }],
      "target" : [{
        "context" : "tgtPatientName",
        "contextType" : "variable",
        "element" : "family",
        "transform" : "copy",
        "parameter" : [{
          "valueId" : "srcPatientName"
        }]
      }],
      "rule" : [{
        "name" : "setFirstNameAndText",
        "source" : [{
          "context" : "srcPatient",
          "element" : "firstName",
          "variable" : "srcPatientFirstName"
        }],
        "target" : [{
          "context" : "tgtPatientName",
          "contextType" : "variable",
          "element" : "given",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "srcPatientFirstName"
          }]
        },
        {
          "context" : "tgtPatientName",
          "contextType" : "variable",
          "element" : "text",
          "transform" : "evaluate",
          "parameter" : [{
            "valueString" : "%srcPatientFirstName + ' ' + %srcPatientName"
          }]
        }]
      }]
    }]
  },
  {
    "name" : "setHumainNir",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcPatient",
      "type" : "PatientTable",
      "mode" : "source"
    },
    {
      "name" : "tgtPatientIdentifier",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setNir",
      "source" : [{
        "context" : "srcPatient",
        "element" : "nir",
        "variable" : "srcPatientNir"
      }],
      "target" : [{
        "context" : "tgtPatientIdentifier",
        "contextType" : "variable",
        "element" : "use",
        "transform" : "copy",
        "parameter" : [{
          "valueString" : "official"
        }]
      },
      {
        "context" : "tgtPatientIdentifier",
        "contextType" : "variable",
        "element" : "type",
        "transform" : "cc",
        "parameter" : [{
          "valueString" : "https://hl7.fr/ig/fhir/core/CodeSystem/fr-core-cs-v2-0203"
        },
        {
          "valueString" : "INS-NIR"
        }]
      },
      {
        "context" : "tgtPatientIdentifier",
        "contextType" : "variable",
        "element" : "system",
        "transform" : "copy",
        "parameter" : [{
          "valueString" : "urn:oid:1.2.250.1.213.1.4.8"
        }]
      },
      {
        "context" : "tgtPatientIdentifier",
        "contextType" : "variable",
        "element" : "value",
        "transform" : "copy",
        "parameter" : [{
          "valueId" : "srcPatientNir"
        }]
      }]
    }]
  },
  {
    "name" : "patientAddress",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcAddress",
      "type" : "AddressTable",
      "mode" : "source"
    },
    {
      "name" : "tgtPatient",
      "type" : "FHIRPatient",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setAddress",
      "source" : [{
        "context" : "srcAddress"
      }],
      "target" : [{
        "context" : "tgtPatient",
        "contextType" : "variable",
        "element" : "address",
        "variable" : "newAddress",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Address"
        }]
      }],
      "rule" : [{
        "name" : "setZip",
        "source" : [{
          "context" : "srcAddress",
          "element" : "zipCode",
          "variable" : "srczip"
        }],
        "target" : [{
          "context" : "newAddress",
          "contextType" : "variable",
          "element" : "postalCode",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "srczip"
          }]
        }]
      },
      {
        "name" : "setCity",
        "source" : [{
          "context" : "srcAddress",
          "element" : "city",
          "variable" : "srcCity"
        }],
        "target" : [{
          "context" : "newAddress",
          "contextType" : "variable",
          "element" : "city",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "srcCity"
          }]
        }]
      },
      {
        "name" : "setCountry",
        "source" : [{
          "context" : "srcAddress",
          "element" : "country",
          "variable" : "srcCountry"
        }],
        "target" : [{
          "context" : "newAddress",
          "contextType" : "variable",
          "element" : "country",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "srcCountry"
          }]
        }]
      },
      {
        "name" : "setText",
        "source" : [{
          "context" : "srcAddress",
          "element" : "address",
          "variable" : "srcAddressText"
        }],
        "target" : [{
          "context" : "newAddress",
          "contextType" : "variable",
          "element" : "text",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "srcAddressText"
          }]
        }]
      },
      {
        "name" : "setUseHome",
        "source" : [{
          "context" : "srcAddress",
          "condition" : "current = true"
        }],
        "target" : [{
          "context" : "newAddress",
          "contextType" : "variable",
          "element" : "use",
          "transform" : "copy",
          "parameter" : [{
            "valueString" : "home"
          }]
        }]
      },
      {
        "name" : "setUseOld",
        "source" : [{
          "context" : "srcAddress",
          "condition" : "current = false"
        }],
        "target" : [{
          "context" : "newAddress",
          "contextType" : "variable",
          "element" : "use",
          "transform" : "copy",
          "parameter" : [{
            "valueString" : "old"
          }]
        }]
      },
      {
        "name" : "setCoordinatesExtension",
        "source" : [{
          "context" : "srcAddress",
          "condition" : "latitude.exists() or longitude.exists()"
        }],
        "target" : [{
          "context" : "newAddress",
          "contextType" : "variable",
          "element" : "extension",
          "variable" : "firstLevelExtension",
          "transform" : "create",
          "parameter" : [{
            "valueString" : "Extension"
          }]
        }],
        "rule" : [{
          "name" : "setflext",
          "source" : [{
            "context" : "srcAddress"
          }],
          "target" : [{
            "context" : "firstLevelExtension",
            "contextType" : "variable",
            "element" : "url",
            "transform" : "evaluate",
            "parameter" : [{
              "valueString" : "'http://hl7.org/fhir/StructureDefinition/geolocation'"
            }]
          }],
          "rule" : [{
            "name" : "setLatExt",
            "source" : [{
              "context" : "srcAddress",
              "element" : "latitude",
              "variable" : "srcLat"
            }],
            "target" : [{
              "context" : "firstLevelExtension",
              "contextType" : "variable",
              "element" : "extension",
              "variable" : "latExtension",
              "transform" : "create",
              "parameter" : [{
                "valueString" : "Extension"
              }]
            }],
            "rule" : [{
              "name" : "setLat",
              "source" : [{
                "context" : "srcLat"
              }],
              "target" : [{
                "context" : "latExtension",
                "contextType" : "variable",
                "element" : "url",
                "transform" : "evaluate",
                "parameter" : [{
                  "valueString" : "'latitude'"
                }]
              },
              {
                "context" : "latExtension",
                "contextType" : "variable",
                "element" : "value",
                "transform" : "copy",
                "parameter" : [{
                  "valueId" : "srcLat"
                }]
              }]
            }]
          },
          {
            "name" : "setLongExt",
            "source" : [{
              "context" : "srcAddress",
              "element" : "longitude",
              "variable" : "srcLong"
            }],
            "target" : [{
              "context" : "firstLevelExtension",
              "contextType" : "variable",
              "element" : "extension",
              "variable" : "longExtension",
              "transform" : "create",
              "parameter" : [{
                "valueString" : "Extension"
              }]
            }],
            "rule" : [{
              "name" : "setLong",
              "source" : [{
                "context" : "srcLong"
              }],
              "target" : [{
                "context" : "longExtension",
                "contextType" : "variable",
                "element" : "url",
                "transform" : "evaluate",
                "parameter" : [{
                  "valueString" : "'longitude'"
                }]
              },
              {
                "context" : "longExtension",
                "contextType" : "variable",
                "element" : "value",
                "transform" : "copy",
                "parameter" : [{
                  "valueId" : "srcLong"
                }]
              }]
            }]
          }]
        }]
      }]
    }]
  },
  {
    "name" : "encounter",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcSejour",
      "type" : "SejourTable",
      "mode" : "source"
    },
    {
      "name" : "srcPatient",
      "type" : "FHIRPatient",
      "mode" : "source"
    },
    {
      "name" : "tgtEncounter",
      "type" : "FHIREncounter",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setId",
      "source" : [{
        "context" : "srcSejour"
      }],
      "target" : [{
        "context" : "tgtEncounter",
        "contextType" : "variable",
        "element" : "id",
        "transform" : "uuid"
      }]
    },
    {
      "name" : "setMeta",
      "source" : [{
        "context" : "srcSejour",
        "element" : "sejourNi",
        "variable" : "srcNi"
      }],
      "target" : [{
        "context" : "tgtEncounter",
        "contextType" : "variable",
        "element" : "meta",
        "variable" : "tgtMeta"
      }],
      "dependent" : [{
        "name" : "setEncounterMeta",
        "variable" : ["srcNi", "tgtMeta"]
      }],
      "documentation" : "copie la valeur du champ patientNi de la table Patient dans l'élément id de la ressource FHIR Patient"
    },
    {
      "name" : "setStatus",
      "source" : [{
        "context" : "srcSejour"
      }],
      "target" : [{
        "context" : "tgtEncounter",
        "contextType" : "variable",
        "element" : "status",
        "transform" : "copy",
        "parameter" : [{
          "valueString" : "finished"
        }]
      }]
    },
    {
      "name" : "setEncounterClass",
      "source" : [{
        "context" : "srcSejour",
        "element" : "sejourType",
        "variable" : "srcSejourType"
      }],
      "target" : [{
        "context" : "tgtEncounter",
        "contextType" : "variable",
        "element" : "class",
        "transform" : "translate",
        "parameter" : [{
          "valueId" : "srcSejourType"
        },
        {
          "valueString" : "https://interop.aphp.fr/ig/fhir/dm/ConceptMap/DpiEncounterType2SemanticLayerEncounterClass"
        },
        {
          "valueString" : "Coding"
        }]
      }]
    },
    {
      "name" : "setSubjectReference",
      "source" : [{
        "context" : "srcPatient",
        "element" : "id",
        "variable" : "patientId"
      }],
      "target" : [{
        "context" : "tgtEncounter",
        "contextType" : "variable",
        "element" : "subject",
        "variable" : "newSubject",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Reference"
        }]
      }],
      "dependent" : [{
        "name" : "setSubjectReference",
        "variable" : ["patientId", "newSubject"]
      }]
    },
    {
      "name" : "patientNi",
      "source" : [{
        "context" : "srcSejour",
        "element" : "patientNi"
      }],
      "documentation" : "fk vers le patient à conserver pour la construction auto du périmètre final"
    },
    {
      "name" : "setPeriod",
      "source" : [{
        "context" : "srcSejour"
      }],
      "target" : [{
        "context" : "tgtEncounter",
        "contextType" : "variable",
        "element" : "period",
        "variable" : "newActualPeriod",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Period"
        }]
      }],
      "rule" : [{
        "name" : "setStart",
        "source" : [{
          "context" : "srcSejour",
          "element" : "sejourStart",
          "variable" : "srcPeriodStart"
        }],
        "target" : [{
          "context" : "newActualPeriod",
          "contextType" : "variable",
          "element" : "start",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "srcPeriodStart"
          }]
        }]
      },
      {
        "name" : "setEnd",
        "source" : [{
          "context" : "srcSejour",
          "element" : "sejourEnd",
          "variable" : "srcPeriodEnd"
        }],
        "target" : [{
          "context" : "newActualPeriod",
          "contextType" : "variable",
          "element" : "end",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "srcPeriodEnd"
          }]
        }]
      }]
    }]
  },
  {
    "name" : "setEncounterMeta",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcNi",
      "mode" : "source"
    },
    {
      "name" : "tgtMeta",
      "type" : "FHIRMeta",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setSource",
      "source" : [{
        "context" : "srcNi"
      }],
      "target" : [{
        "context" : "tgtMeta",
        "contextType" : "variable",
        "element" : "source",
        "transform" : "evaluate",
        "parameter" : [{
          "valueString" : "'https://aphp.fr/fhir/Endpoint/dpi/SejourTable' + '/' + %srcNi.toString()"
        }]
      }]
    }]
  },
  {
    "name" : "setSubjectReference",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcPatientId",
      "mode" : "source"
    },
    {
      "name" : "newSubject",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setReference",
      "source" : [{
        "context" : "srcPatientId"
      }],
      "target" : [{
        "context" : "newSubject",
        "contextType" : "variable",
        "element" : "reference",
        "transform" : "evaluate",
        "parameter" : [{
          "valueString" : "'Patient/' + %srcPatientId.toString()"
        }]
      }]
    }]
  },
  {
    "name" : "procedure",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcActe",
      "type" : "ActeTable",
      "mode" : "source"
    },
    {
      "name" : "srcPatient",
      "type" : "FHIRPatient",
      "mode" : "source"
    },
    {
      "name" : "srcEncounter",
      "type" : "FHIREncounter",
      "mode" : "source"
    },
    {
      "name" : "tgtProcedure",
      "type" : "FHIRProcedure",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setId",
      "source" : [{
        "context" : "srcActe"
      }],
      "target" : [{
        "context" : "tgtProcedure",
        "contextType" : "variable",
        "element" : "id",
        "transform" : "uuid"
      }]
    },
    {
      "name" : "setMeta",
      "source" : [{
        "context" : "srcActe",
        "element" : "acteNi",
        "variable" : "srcNi"
      }],
      "target" : [{
        "context" : "tgtProcedure",
        "contextType" : "variable",
        "element" : "meta",
        "variable" : "tgtMeta"
      }],
      "dependent" : [{
        "name" : "setProcedureMeta",
        "variable" : ["srcNi", "tgtMeta"]
      }]
    },
    {
      "name" : "setSubjectReference",
      "source" : [{
        "context" : "srcPatient",
        "element" : "id",
        "variable" : "patientId"
      }],
      "target" : [{
        "context" : "tgtProcedure",
        "contextType" : "variable",
        "element" : "subject",
        "variable" : "newSubject",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Reference"
        }]
      }],
      "dependent" : [{
        "name" : "setSubjectReference",
        "variable" : ["patientId", "newSubject"]
      }]
    },
    {
      "name" : "setEncounterReference",
      "source" : [{
        "context" : "srcEncounter",
        "element" : "id",
        "variable" : "encounterId"
      }],
      "target" : [{
        "context" : "tgtProcedure",
        "contextType" : "variable",
        "element" : "encounter",
        "variable" : "newEncounter",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Reference"
        }]
      }],
      "dependent" : [{
        "name" : "setEncounterReference",
        "variable" : ["encounterId", "newEncounter"]
      }]
    },
    {
      "name" : "setStatus",
      "source" : [{
        "context" : "srcActe"
      }],
      "target" : [{
        "context" : "tgtProcedure",
        "contextType" : "variable",
        "element" : "status",
        "transform" : "copy",
        "parameter" : [{
          "valueString" : "completed"
        }]
      }]
    },
    {
      "name" : "setDate",
      "source" : [{
        "context" : "srcActe",
        "condition" : "dateStart.exists() or dateEnd.exists"
      }],
      "target" : [{
        "context" : "tgtProcedure",
        "contextType" : "variable",
        "element" : "performed",
        "variable" : "tgtProcedurePeriod",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Period"
        }]
      }],
      "rule" : [{
        "name" : "setActeStart",
        "source" : [{
          "context" : "srcActe",
          "element" : "dateStart",
          "variable" : "srcActeStart"
        }],
        "target" : [{
          "context" : "tgtProcedurePeriod",
          "contextType" : "variable",
          "element" : "start",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "srcActeStart"
          }]
        }]
      },
      {
        "name" : "setActeEnd",
        "source" : [{
          "context" : "srcActe",
          "element" : "dateEnd",
          "variable" : "srcActeEnd"
        }],
        "target" : [{
          "context" : "tgtProcedurePeriod",
          "contextType" : "variable",
          "element" : "end",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "srcActeEnd"
          }]
        }]
      }]
    },
    {
      "name" : "setCode",
      "source" : [{
        "context" : "srcActe",
        "element" : "code",
        "variable" : "acteCode"
      }],
      "target" : [{
        "context" : "tgtProcedure",
        "contextType" : "variable",
        "element" : "code",
        "transform" : "cc",
        "parameter" : [{
          "valueString" : "https://smt.esante.gouv.fr/terminologie-ccam"
        },
        {
          "valueId" : "acteCode"
        }]
      }],
      "documentation" : "C'est le code de la CCAM facturante"
    }]
  },
  {
    "name" : "setProcedureMeta",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcNi",
      "mode" : "source"
    },
    {
      "name" : "tgtMeta",
      "type" : "FHIRMeta",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setSource",
      "source" : [{
        "context" : "srcNi"
      }],
      "target" : [{
        "context" : "tgtMeta",
        "contextType" : "variable",
        "element" : "source",
        "transform" : "evaluate",
        "parameter" : [{
          "valueString" : "'https://aphp.fr/fhir/Endpoint/dpi/ActeTable' + '/' + %srcNi.toString()"
        }]
      }]
    }]
  },
  {
    "name" : "setEncounterReference",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcEncounterId",
      "mode" : "source"
    },
    {
      "name" : "newEncounter",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setReference",
      "source" : [{
        "context" : "srcEncounterId"
      }],
      "target" : [{
        "context" : "newEncounter",
        "contextType" : "variable",
        "element" : "reference",
        "transform" : "evaluate",
        "parameter" : [{
          "valueString" : "'Encounter/' + %srcEncounterId.toString()"
        }]
      }]
    }]
  },
  {
    "name" : "condition",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcDiag",
      "type" : "DiagTable",
      "mode" : "source"
    },
    {
      "name" : "srcPatient",
      "type" : "FHIRPatient",
      "mode" : "source"
    },
    {
      "name" : "srcEncounter",
      "type" : "FHIREncounter",
      "mode" : "source"
    },
    {
      "name" : "tgtCondition",
      "type" : "FHIRCondition",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setId",
      "source" : [{
        "context" : "srcDiag"
      }],
      "target" : [{
        "context" : "tgtCondition",
        "contextType" : "variable",
        "element" : "id",
        "transform" : "uuid"
      }]
    },
    {
      "name" : "setMeta",
      "source" : [{
        "context" : "srcDiag",
        "element" : "diagNi",
        "variable" : "srcNi"
      }],
      "target" : [{
        "context" : "tgtCondition",
        "contextType" : "variable",
        "element" : "meta",
        "variable" : "tgtMeta"
      }],
      "dependent" : [{
        "name" : "setConditionMeta",
        "variable" : ["srcNi", "tgtMeta"]
      }]
    },
    {
      "name" : "setSubjectReference",
      "source" : [{
        "context" : "srcPatient",
        "element" : "id",
        "variable" : "patientId"
      }],
      "target" : [{
        "context" : "tgtCondition",
        "contextType" : "variable",
        "element" : "subject",
        "variable" : "newSubject",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Reference"
        }]
      }],
      "dependent" : [{
        "name" : "setSubjectReference",
        "variable" : ["patientId", "newSubject"]
      }]
    },
    {
      "name" : "setEncounterReference",
      "source" : [{
        "context" : "srcEncounter",
        "element" : "id",
        "variable" : "encounterId"
      }],
      "target" : [{
        "context" : "tgtCondition",
        "contextType" : "variable",
        "element" : "encounter",
        "variable" : "newEncounter",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Reference"
        }]
      }],
      "dependent" : [{
        "name" : "setEncounterReference",
        "variable" : ["encounterId", "newEncounter"]
      }]
    },
    {
      "name" : "setVerificationStatus",
      "source" : [{
        "context" : "srcDiag"
      }],
      "target" : [{
        "context" : "tgtCondition",
        "contextType" : "variable",
        "element" : "verificationStatus",
        "transform" : "copy",
        "parameter" : [{
          "valueString" : "confirmed"
        }]
      }]
    },
    {
      "name" : "setCategory",
      "source" : [{
        "context" : "srcDiag"
      }],
      "target" : [{
        "context" : "tgtCondition",
        "contextType" : "variable",
        "element" : "category",
        "transform" : "cc",
        "parameter" : [{
          "valueString" : "http://terminology.hl7.org/CodeSystem/condition-category"
        },
        {
          "valueString" : "encounter-diagnosis"
        }]
      }]
    },
    {
      "name" : "setCode",
      "source" : [{
        "context" : "srcDiag",
        "element" : "code",
        "variable" : "diagCode"
      }],
      "target" : [{
        "context" : "tgtCondition",
        "contextType" : "variable",
        "element" : "code",
        "transform" : "cc",
        "parameter" : [{
          "valueString" : "http://hl7.org/fhir/sid/icd-10"
        },
        {
          "valueId" : "diagCode"
        }]
      }]
    }]
  },
  {
    "name" : "setConditionMeta",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcNi",
      "mode" : "source"
    },
    {
      "name" : "tgtMeta",
      "type" : "FHIRMeta",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setSource",
      "source" : [{
        "context" : "srcNi"
      }],
      "target" : [{
        "context" : "tgtMeta",
        "contextType" : "variable",
        "element" : "source",
        "transform" : "evaluate",
        "parameter" : [{
          "valueString" : "'https://aphp.fr/fhir/Endpoint/dpi/DiagTable' + '/' + %srcNi.toString()"
        }]
      }]
    }]
  },
  {
    "name" : "observationBiol",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcBiology",
      "type" : "BiologyTable",
      "mode" : "source"
    },
    {
      "name" : "srcPatient",
      "type" : "FHIRPatient",
      "mode" : "source"
    },
    {
      "name" : "srcEncounter",
      "type" : "FHIREncounter",
      "mode" : "source"
    },
    {
      "name" : "tgtObservation",
      "type" : "FHIRObservation",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setId",
      "source" : [{
        "context" : "srcBiology"
      }],
      "target" : [{
        "context" : "tgtObservation",
        "contextType" : "variable",
        "element" : "id",
        "transform" : "uuid"
      }]
    },
    {
      "name" : "setMeta",
      "source" : [{
        "context" : "srcBiology",
        "element" : "biologyNi",
        "variable" : "srcNi"
      }],
      "target" : [{
        "context" : "tgtObservation",
        "contextType" : "variable",
        "element" : "meta",
        "variable" : "tgtMeta"
      }],
      "dependent" : [{
        "name" : "setBiologyMeta",
        "variable" : ["srcNi", "tgtMeta"]
      }]
    },
    {
      "name" : "setSubjectReference",
      "source" : [{
        "context" : "srcPatient",
        "element" : "id",
        "variable" : "patientId"
      }],
      "target" : [{
        "context" : "tgtObservation",
        "contextType" : "variable",
        "element" : "subject",
        "variable" : "newSubject",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Reference"
        }]
      }],
      "dependent" : [{
        "name" : "setSubjectReference",
        "variable" : ["patientId", "newSubject"]
      }]
    },
    {
      "name" : "setEncounterReference",
      "source" : [{
        "context" : "srcEncounter",
        "element" : "id",
        "variable" : "encounterId"
      }],
      "target" : [{
        "context" : "tgtObservation",
        "contextType" : "variable",
        "element" : "encounter",
        "variable" : "newEncounter",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Reference"
        }]
      }],
      "dependent" : [{
        "name" : "setEncounterReference",
        "variable" : ["encounterId", "newEncounter"]
      }]
    },
    {
      "name" : "setStatus",
      "source" : [{
        "context" : "srcBiology"
      }],
      "target" : [{
        "context" : "tgtObservation",
        "contextType" : "variable",
        "element" : "status",
        "transform" : "copy",
        "parameter" : [{
          "valueString" : "final"
        }]
      }]
    },
    {
      "name" : "setCategory",
      "source" : [{
        "context" : "srcBiology"
      }],
      "target" : [{
        "context" : "tgtObservation",
        "contextType" : "variable",
        "element" : "category",
        "transform" : "cc",
        "parameter" : [{
          "valueString" : "http://terminology.hl7.org/CodeSystem/observation-category"
        },
        {
          "valueString" : "vital-signs"
        }]
      }]
    },
    {
      "name" : "setDate",
      "source" : [{
        "context" : "srcBiology",
        "element" : "biologyDatePrel",
        "variable" : "biologyDatePrel"
      }],
      "target" : [{
        "context" : "tgtObservation",
        "contextType" : "variable",
        "element" : "effective",
        "transform" : "copy",
        "parameter" : [{
          "valueId" : "biologyDatePrel"
        }]
      }]
    },
    {
      "name" : "setCode",
      "source" : [{
        "context" : "srcBiology",
        "element" : "biologyCode",
        "variable" : "biologyCode"
      }],
      "target" : [{
        "context" : "tgtObservation",
        "contextType" : "variable",
        "element" : "code",
        "transform" : "cc",
        "parameter" : [{
          "valueString" : "http://loinc.org"
        },
        {
          "valueId" : "biologyCode"
        }]
      }]
    },
    {
      "name" : "setQuantity",
      "source" : [{
        "context" : "srcBiology",
        "element" : "biologyValue"
      }],
      "target" : [{
        "context" : "tgtObservation",
        "contextType" : "variable",
        "element" : "value",
        "variable" : "tgtObsQuantity",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "Quantity"
        }]
      }],
      "rule" : [{
        "name" : "setValue",
        "source" : [{
          "context" : "srcBiology",
          "element" : "biologyValue",
          "variable" : "biologyValue"
        }],
        "target" : [{
          "context" : "tgtObsQuantity",
          "contextType" : "variable",
          "element" : "value",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "biologyValue"
          }]
        }]
      },
      {
        "name" : "setUnit",
        "source" : [{
          "context" : "srcBiology",
          "element" : "biologyUnit",
          "variable" : "biologyUnit"
        }],
        "target" : [{
          "context" : "tgtObsQuantity",
          "contextType" : "variable",
          "element" : "code",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "biologyUnit"
          }]
        },
        {
          "context" : "tgtObsQuantity",
          "contextType" : "variable",
          "element" : "unit",
          "transform" : "copy",
          "parameter" : [{
            "valueId" : "biologyUnit"
          }]
        },
        {
          "context" : "tgtObsQuantity",
          "contextType" : "variable",
          "element" : "system",
          "transform" : "copy",
          "parameter" : [{
            "valueString" : "http://unitsofmeasure.org"
          }]
        }]
      }]
    }]
  },
  {
    "name" : "setBiologyMeta",
    "typeMode" : "none",
    "input" : [{
      "name" : "srcNi",
      "mode" : "source"
    },
    {
      "name" : "tgtMeta",
      "type" : "FHIRMeta",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setSource",
      "source" : [{
        "context" : "srcNi"
      }],
      "target" : [{
        "context" : "tgtMeta",
        "contextType" : "variable",
        "element" : "source",
        "transform" : "evaluate",
        "parameter" : [{
          "valueString" : "'https://aphp.fr/fhir/Endpoint/dpi/BiologyTable' + '/' + %srcNi.toString()"
        }]
      }]
    }]
  },
  {
    "name" : "setEntryRequestAndFullUrl",
    "typeMode" : "none",
    "input" : [{
      "name" : "newRes",
      "mode" : "source"
    },
    {
      "name" : "tgtEntry",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "setResourceType",
      "source" : [{
        "context" : "newRes",
        "element" : "id",
        "variable" : "newResId"
      }],
      "rule" : [{
        "name" : "setFullUrl",
        "source" : [{
          "context" : "newResId"
        }],
        "target" : [{
          "context" : "tgtEntry",
          "contextType" : "variable",
          "element" : "fullUrl",
          "transform" : "evaluate",
          "parameter" : [{
            "valueString" : "'https://aphp.fr/' + %newRes.type().name + '/' + %newResId"
          }]
        }]
      },
      {
        "name" : "setRequest",
        "source" : [{
          "context" : "newResId"
        }],
        "target" : [{
          "context" : "tgtEntry",
          "contextType" : "variable",
          "element" : "request",
          "variable" : "tgtEntryRequest"
        },
        {
          "context" : "tgtEntryRequest",
          "contextType" : "variable",
          "element" : "method",
          "transform" : "copy",
          "parameter" : [{
            "valueString" : "POST"
          }]
        },
        {
          "context" : "tgtEntryRequest",
          "contextType" : "variable",
          "element" : "url",
          "transform" : "evaluate",
          "parameter" : [{
            "valueString" : "%newRes.type().name + '/' + %newResId"
          }]
        }]
      }]
    }]
  }]
}

```
