Data Management with FHIR - version de développement local (intégration continue v0.1.0) construite par les outils de publication FHIR (HL7® FHIR® Standard). Voir le répertoire des versions publiées
| Draft as of 2026-07-11 |
@prefix fhir: <http://hl7.org/fhir/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . # - resource ------------------------------------------------------------------- <http://hl7.org/fhir/StructureMap/EHR2FSL> a fhir:StructureMap ; fhir:nodeRole fhir:treeRoot ; fhir:Resource.id [ fhir:value "EHR2FSL"] ; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ] ; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Narratif généré : StructureMap EHR2FSL</b></p><a name=\"EHR2FSL\"> </a><a name=\"hcEHR2FSL\"> </a><pre class=\"fml\">#xD;\n<b>map</b><span style=\"color: navy\"> \"</span>https://interop.aphp.fr/ig/fhir/dm/StructureMap/EHR2FSL<span style=\"color: navy\">\" = \"</span>EHR2FSL<span style=\"color: navy\">\"#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Transforms EHR logical model data to FHIR Semantic Layer resources using Bundle as container</span>#xD;\n#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/ehr<span style=\"color: navy\">\" </span><b>alias </b>EHR <b>as </b><b>source</b>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"http://hl7.org/fhir/R4/bundle.html\" title=\"Bundle\">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style=\"color: navy\">\" </span><b>alias </b>Bundle <b>as </b><b>target</b>#xD;\n#xD;\n<b>group </b>EHR2FSL<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>EHR, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Initialize Bundle</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>bundle.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"bundleid\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>bundle.type = <span style=\"color: blue\">'collection'</span> <i>\"bundletype\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span><span style=\"color: navy\">(</span>now()<span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">timestamp</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>bundle.timestamp = <span style=\"color: maroon\">timestamp</span> <i>\"affectTimestamp\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"setTimestamp\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Transform Patient</span>#xD;\n src.patient<b> as </b><span style=\"color: maroon\">patient</span><span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">patientEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient<span style=\"color: navy\"><b> -> </b></span>patientEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Patient'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dmPatient</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient<b> then </b>TransformPatient<span style=\"color: navy\">(</span><span style=\"color: maroon\">patient</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"transformpatient\"</i><span style=\"color: navy\">;</span>#xD;\n patient<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">patientEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n src.patientAdresse<b> as </b><span style=\"color: maroon\">patientAdresse</span><b> where </b>patientAdresse.patientId = %patient.patientId<b> then </b>setAddress<span style=\"color: navy\">(</span><span style=\"color: maroon\">patientAdresse</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"transformpatientAdresse\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Transform PMSI Encounters</span>#xD;\n src.donneesPmsi<b> as </b><span style=\"color: maroon\">pmsi</span><b> where </b>pmsi.patientId = %patient.patientId<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">encounterEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> pmsi<span style=\"color: navy\"><b> -> </b></span>encounterEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Encounter'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dmEncounter</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> pmsi<b> then </b>TransformEncounter<span style=\"color: navy\">(</span><span style=\"color: maroon\">pmsi</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmEncounter</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"transformencounter\"</i><span style=\"color: navy\">;</span>#xD;\n pmsi<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">dmEncounter</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">encounterEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Transform Conditions (Diagnostics)</span>#xD;\n src.diagnostics<b> as </b><span style=\"color: maroon\">diag</span><b> where </b>(diag.patientId = %patient.patientId) and (diag.pmsiId = %pmsi.pmsiId)<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">conditionEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> diag<span style=\"color: navy\"><b> -> </b></span>conditionEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Condition'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dmCondition</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> diag<b> then </b>TransformCondition<span style=\"color: navy\">(</span><span style=\"color: maroon\">diag</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmCondition</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmEncounter</span><span style=\"color: navy\">)</span> <i>\"transformcondition\"</i><span style=\"color: navy\">;</span>#xD;\n diag<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">dmCondition</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">conditionEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createcondition\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"conditionentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Transform Procedures (Actes)</span>#xD;\n src.actes<b> as </b><span style=\"color: maroon\">acte</span><b> where </b>(acte.patientId = %patient.patientId) and (acte.pmsiId = %pmsi.pmsiId)<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">procedureEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> acte<span style=\"color: navy\"><b> -> </b></span>procedureEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Procedure'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dmProcedure</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> acte<b> then </b>TransformProcedure<span style=\"color: navy\">(</span><span style=\"color: maroon\">acte</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmProcedure</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmEncounter</span><span style=\"color: navy\">)</span> <i>\"transformprocedure\"</i><span style=\"color: navy\">;</span>#xD;\n acte<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">dmProcedure</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">procedureEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createprocedure\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"procedureentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createencounter\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"encounterentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Transform Laboratory Observations</span>#xD;\n src.biologie<b> as </b><span style=\"color: maroon\">lab</span><b> where </b>lab.patientId = %patient.patientId<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">labEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lab<span style=\"color: navy\"><b> -> </b></span>labEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dmLab</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lab<b> then </b>TransformLabObservation<span style=\"color: navy\">(</span><span style=\"color: maroon\">lab</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmLab</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"transformLabObs\"</i><span style=\"color: navy\">;</span>#xD;\n lab<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">dmLab</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">labEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createlabobs\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"labentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Transform Medication Requests</span>#xD;\n src.prescription<b> as </b><span style=\"color: maroon\">pres</span><b> where </b>pres.patientId = %patient.patientId<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">medReqEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> pres<span style=\"color: navy\"><b> -> </b></span>medReqEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'MedicationRequest'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dmMedReq</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<b> then </b>TransformMedicationRequest<span style=\"color: navy\">(</span><span style=\"color: maroon\">pres</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmMedReq</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"createmedrequest\"</i><span style=\"color: navy\">;</span>#xD;\n pres<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">dmMedReq</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">medReqEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n src.posologie<b> as </b><span style=\"color: maroon\">poso</span><b> where </b>%poso.prescriptionId = %pres.prescriptionId<b> then </b>setPoso<span style=\"color: navy\">(</span><span style=\"color: maroon\">poso</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">pres</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmMedReq</span><span style=\"color: navy\">)</span> <i>\"transformPoso\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Transform Administration (W prescription)</span>#xD;\n src.administration<b> as </b><span style=\"color: maroon\">admin</span><b> where </b>(admin.patientId = %patient.patientId) and (admin.prescriptionId = pres.prescriptionId)<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">adminEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> admin<span style=\"color: navy\"><b> -> </b></span>adminEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'MedicationAdministration'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dmAdmin</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> admin<b> then </b>TransformMedicationAdministrationWOrder<span style=\"color: navy\">(</span><span style=\"color: maroon\">admin</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmAdmin</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmMedReq</span><span style=\"color: navy\">)</span> <i>\"createmedadmin\"</i><span style=\"color: navy\">;</span>#xD;\n admin<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">dmAdmin</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">adminEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createmedadmin\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"administrationentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createmedreq\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"medicationentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Transform Lifestyle Observations - separate observation for each lifestyle element</span>#xD;\n src.styleVie<b> as </b><span style=\"color: maroon\">lifestyle</span><b> where </b>lifestyle.patientId = %patient.patientId<b> then</b><span style=\"color: navy\"> {#xD;\n</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Tobacco consumption observation</span>#xD;\n lifestyle.consommationTabac<b> as </b><span style=\"color: maroon\">tobacco</span><b> where </b>tobacco.exists()<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">tobaccoEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> tobacco<span style=\"color: navy\"><b> -> </b></span>tobaccoEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">tobaccoObs</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lifestyle<b> then </b>TransformTobaccoObservation<span style=\"color: navy\">(</span><span style=\"color: maroon\">lifestyle</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tobaccoObs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"createtobaccoobs\"</i><span style=\"color: navy\">;</span>#xD;\n lifestyle<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">tobaccoObs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tobaccoEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createtobaccoobs\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"tobaccoentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Alcohol consumption observation</span>#xD;\n lifestyle.consommationAlcool<b> as </b><span style=\"color: maroon\">alcohol</span><b> where </b>alcohol.exists()<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">alcoholEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> alcohol<span style=\"color: navy\"><b> -> </b></span>alcoholEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">alcoholObs</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lifestyle<b> then </b>TransformAlcoholObservation<span style=\"color: navy\">(</span><span style=\"color: maroon\">lifestyle</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">alcoholObs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"createalcoholobs\"</i><span style=\"color: navy\">;</span>#xD;\n lifestyle<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">alcoholObs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">alcoholEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createalcoholobs\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"alcoholentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Drug consumption observation</span>#xD;\n lifestyle.consommationAutresDrogues<b> as </b><span style=\"color: maroon\">drugs</span><b> where </b>drugs.exists()<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">drugEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> drugs<span style=\"color: navy\"><b> -> </b></span>drugEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">drugObs</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lifestyle<b> then </b>TransformDrugObservation<span style=\"color: navy\">(</span><span style=\"color: maroon\">lifestyle</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">drugObs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"createdrugobs\"</i><span style=\"color: navy\">;</span>#xD;\n lifestyle<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">drugObs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">drugEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createdrugobs\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"drugentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Physical activity observation</span>#xD;\n lifestyle.activitePhysique<b> as </b><span style=\"color: maroon\">physical</span><b> where </b>physical.exists()<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">physicalEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> physical<span style=\"color: navy\"><b> -> </b></span>physicalEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">physicalObs</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lifestyle<b> then </b>TransformPhysicalActivityObservation<span style=\"color: navy\">(</span><span style=\"color: maroon\">lifestyle</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">physicalObs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"createphysicalobs\"</i><span style=\"color: navy\">;</span>#xD;\n lifestyle<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">physicalObs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">physicalEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createphysicalobs\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"physicalentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestyleentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Transform Care Observations (s)</span>#xD;\n src.dossierSoins<b> as </b><span style=\"color: maroon\">soin</span><b> where </b>soin.patientId = %patient.patientId<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">vitalEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> soin<span style=\"color: navy\"><b> -> </b></span>vitalEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dmObs</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> soin<b> then </b>TransformVitalSigns<span style=\"color: navy\">(</span><span style=\"color: maroon\">soin</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmObs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"createmesureobs\"</i><span style=\"color: navy\">;</span>#xD;\n soin<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">dmObs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vitalEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createmesureobs\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"vitalentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Transform Administration (WO prescription)</span>#xD;\n src.administration<b> as </b><span style=\"color: maroon\">admin</span><b> where </b>(admin.patientId = %patient.patientId) and admin.prescriptionId.empty()<span style=\"color: navy\"><b> -> </b></span>bundle.entry<b> as </b><span style=\"color: maroon\">adminEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> admin<span style=\"color: navy\"><b> -> </b></span>adminEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'MedicationAdministration'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dmAdmin</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> admin<b> then </b>TransformMedicationAdministrationWOOrder<span style=\"color: navy\">(</span><span style=\"color: maroon\">admin</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmAdmin</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">dmPatient</span><span style=\"color: navy\">)</span> <i>\"createmedadmin\"</i><span style=\"color: navy\">;</span>#xD;\n admin<b> then </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">dmAdmin</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">adminEntry</span><span style=\"color: navy\">)</span> <i>\"setRequestAndFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createmedadmin\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"administrationentries\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createpatient\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"patiententry\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">---------------------------------------------------------</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">PATIENT TRANSFORMATION</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">---------------------------------------------------------</span>#xD;\n<b>group </b>TransformPatient<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Patient<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgt.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: #b36b00\" title=\"Cet élément n'était pas défini avant R5\">// src.patientId as id -> tgt.id = id \"patient-id\";</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifiers</span>#xD;\n src.patientId<b> as </b><span style=\"color: maroon\">pid</span><span style=\"color: navy\"><b> -> </b></span>tgt.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> pid<span style=\"color: navy\"><b> -> </b></span>identifier.use = <span style=\"color: blue\">'usual'</span> <i>\"iduse\"</i><span style=\"color: navy\">;</span>#xD;\n pid<span style=\"color: navy\"><b> -> </b></span>identifier.type = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/v2-0203'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'PI'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Patient Identifier'</span><span style=\"color: navy\">)</span> <i>\"idtype\"</i><span style=\"color: navy\">;</span>#xD;\n pid<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/patient-id'</span> <i>\"idsystem\"</i><span style=\"color: navy\">;</span>#xD;\n pid<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">pid</span> <i>\"idvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"patientidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">NIR identifier <- C'est pas terrible côté expression de besoin : qu'est ce qu'ils veulent quand ils disent NIR ? ça peut être le NSS, mais du coup c'est pas un identifier (un NSS peut correspondre à plusieurs ayant droits), et ce serait plutôt une info qui irait côté claim. ça peut aussi être l'ins-nir, mais du coup qu'est ce qu'ils attendent dans l'ins ? Bref, à mon avis, faut discuter cette variable au niveau du GT.</span>#xD;\n <span style=\"color: #b36b00\" title=\"Cet élément n'était pas défini avant R5\">// src.nir as nir where nir.exists() -> tgt.identifier as insIdentifier then { nir -> insIdentifier.use = 'official' \"ins-use\"; nir -> insIdentifier.type = cc('http://hl7.fr/fhir/CodeSystem/fr-v2-0203', 'INS-NIR') \"ins-type\"; nir -> insIdentifier.system = 'urn:oid:1.2.250.1.213.1.4.8' \"ins-system\"; nir -> insIdentifier.value = nir \"ins-value\"; } \"ins-identifier\";</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Alternative INS from ins field</span>#xD;\n src.ins<b> as </b><span style=\"color: maroon\">ins</span><b> where </b>ins.exists()<span style=\"color: navy\"><b> -> </b></span>tgt.identifier<b> as </b><span style=\"color: maroon\">insIdentifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> ins<span style=\"color: navy\"><b> -> </b></span>insIdentifier.use = <span style=\"color: blue\">'official'</span> <i>\"insuse\"</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">On part du principe qu'on n'est pas sur un old.</span>#xD;\n ins<span style=\"color: navy\"><b> -> </b></span>insIdentifier.type = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'https://hl7.fr/ig/fhir/core/CodeSystem/fr-core-cs-v2-0203'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'INS-NIR'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'NIR définitif'</span><span style=\"color: navy\">)</span> <i>\"instype\"</i><span style=\"color: navy\">;</span>#xD;\n ins<span style=\"color: navy\"><b> -> </b></span>insIdentifier.system = <span style=\"color: blue\">'urn:oid:1.2.250.1.213.1.4.8'</span> <i>\"inssystem\"</i><span style=\"color: navy\">;</span>#xD;\n ins<span style=\"color: navy\"><b> -> </b></span>insIdentifier.value = <span style=\"color: maroon\">ins</span> <i>\"insvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"insidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Name</span>#xD;\n src<b> where </b>src.nom.exists() or src.prenom.exists()<span style=\"color: navy\"><b> -> </b></span>tgt.name<b> as </b><span style=\"color: maroon\">name</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src.nom<b> as </b><span style=\"color: maroon\">lastName</span><span style=\"color: navy\"><b> -> </b></span>name.family = <span style=\"color: maroon\">lastName</span> <i>\"familyname\"</i><span style=\"color: navy\">;</span>#xD;\n src.prenom<b> as </b><span style=\"color: maroon\">firstName</span><span style=\"color: navy\"><b> -> </b></span>name.given = <span style=\"color: maroon\">firstName</span> <i>\"givenname\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>name.use = <span style=\"color: blue\">'official'</span> <i>\"nameuse\"</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">hypothèse un peu forte.</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"patientname\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Demographics On aurait pu faire plus élégant avec un ConceptMap</span>#xD;\n src.dateNaissance<b> as </b><span style=\"color: maroon\">birthDate</span><span style=\"color: navy\"><b> -> </b></span>tgt.birthDate = <span style=\"color: maroon\">birthDate</span> <i>\"birthdate\"</i><span style=\"color: navy\">;</span>#xD;\n src.sexe<b> as </b><span style=\"color: maroon\">gender</span><b> where </b>gender = 'h'<span style=\"color: navy\"><b> -> </b></span>tgt.gender = <span style=\"color: blue\">'male'</span> <i>\"gendermale\"</i><span style=\"color: navy\">;</span>#xD;\n src.sexe<b> as </b><span style=\"color: maroon\">gender</span><b> where </b>gender = 'f'<span style=\"color: navy\"><b> -> </b></span>tgt.gender = <span style=\"color: blue\">'female'</span> <i>\"genderfemale\"</i><span style=\"color: navy\">;</span>#xD;\n src.sexe<b> as </b><span style=\"color: maroon\">gender</span><b> where </b>gender.exists() and (gender != 'h') and (gender != 'f')<span style=\"color: navy\"><b> -> </b></span>tgt.gender = <span style=\"color: blue\">'unknown'</span> <i>\"genderunknown\"</i><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">n'a pas grand sens en l'état des contraintes SQL</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Death information</span>#xD;\n src.dateDeces<b> as </b><span style=\"color: maroon\">deathDate</span><b> where </b>deathDate.exists()<span style=\"color: navy\"><b> -> </b></span>tgt.deceased = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">deathDate</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">deceasedDate</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src.sourceDeces<b> as </b><span style=\"color: maroon\">deathSource</span><b> where </b>deathSource.exists()<span style=\"color: navy\"><b> -> </b></span>deceasedDate.extension<b> as </b><span style=\"color: maroon\">DeathSourceExtension</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> deathSource<span style=\"color: navy\"><b> -> </b></span>DeathSourceExtension.url = <span style=\"color: blue\">'https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/DeathSource'</span> <i>\"deathSourceUrl\"</i><span style=\"color: navy\">;</span>#xD;\n deathSource<span style=\"color: navy\"><b> -> </b></span>DeathSourceExtension.value = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">deathSource</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span> <i>\"deathSourceValue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"deathSource\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"deathDate\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Multiple birth</span>#xD;\n src.rangGemellaire<b> as </b><span style=\"color: maroon\">twin</span><b> where </b>twin.exists()<span style=\"color: navy\"><b> -> </b></span>tgt.multipleBirth = <span style=\"color: maroon\">twin</span> <i>\"multiplebirth\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">PATIENT_LOCATION TRANSFORMATION</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<b>group </b>setAddress<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtPat</span><span style=\"color: navy\"> : </span>Patient<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<b> where </b>src.latitude.exists() or src.longitude.exists() or src.codeIris.exists() or src.libelleIris.exists() or src.codeGeographiqueResidence.exists()<b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtPat.address<b> as </b><span style=\"color: maroon\">newAddress</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<b> where </b>src.latitude.exists() or src.longitude.exists()<span style=\"color: navy\"><b> -> </b></span> newAddress.extension<b> as </b><span style=\"color: maroon\">geolocationExtension</span><span style=\"color: navy\">, </span> geolocationExtension.url = <span style=\"color: blue\">'http://hl7.org/fhir/StructureDefinition/geolocation'</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src.latitude<b> as </b><span style=\"color: maroon\">srcLat</span><span style=\"color: navy\"><b> -> </b></span> geolocationExtension.extension<b> as </b><span style=\"color: maroon\">tgtLat</span><span style=\"color: navy\">, </span> tgtLat.url = <span style=\"color: blue\">'latitude'</span><span style=\"color: navy\">, </span> tgtLat.value = <span style=\"color: maroon\">srcLat</span> <i>\"setLat\"</i><span style=\"color: navy\">;</span>#xD;\n src.longitude<b> as </b><span style=\"color: maroon\">srcLong</span><span style=\"color: navy\"><b> -> </b></span> geolocationExtension.extension<b> as </b><span style=\"color: maroon\">tgtLong</span><span style=\"color: navy\">, </span> tgtLong.url = <span style=\"color: blue\">'longitude'</span><span style=\"color: navy\">, </span> tgtLong.value = <span style=\"color: maroon\">srcLong</span> <i>\"setLong\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"setCoordinates\"</i><span style=\"color: navy\">;</span>#xD;\n src<b> where </b>src.codeIris.exists() or src.libelleIris.exists()<span style=\"color: navy\"><b> -> </b></span> newAddress.line = <span style=\"color: navy\">(</span>%src.libelleIris<span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">irisLine</span><span style=\"color: navy\">, </span> irisLine.extension = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Extension'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">irisExtension</span><span style=\"color: navy\">, </span> irisExtension.url = <span style=\"color: blue\">'http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract'</span><span style=\"color: navy\">, </span> irisExtension.value = <span style=\"color: navy\">(</span>%src.codeIris<span style=\"color: navy\">)</span> <i>\"setIris\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">src where src.codeIris.exists() or src.libelleIris.exists() -> newAddress.extension as irisExtension,</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">irisExtension.url = 'http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract',</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">irisExtension.value = (iif(%src.codeIris.exists() and %src.libelleIris.exists(), %src.codeIris & ' - ' & %src.libelleIris, %src.codeIris & %src.libelleIris)) \"setIris\";</span>#xD;\n src.codeGeographiqueResidence<b> as </b><span style=\"color: maroon\">srcCodeGeographiqueResidence</span><b> where </b>src.codeGeographiqueResidence.exists()<span style=\"color: navy\"><b> -> </b></span> newAddress.extension<b> as </b><span style=\"color: maroon\">residencePmsiExtension</span><span style=\"color: navy\">, </span> residencePmsiExtension.url = <span style=\"color: blue\">'https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/PmsiCodeGeo'</span><span style=\"color: navy\">, </span> residencePmsiExtension.value = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">srcCodeGeographiqueResidence</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span> <i>\"SetResidencePmsi\"</i><span style=\"color: navy\">;</span>#xD;\n src.dateRecueil<b> as </b><span style=\"color: maroon\">dateRecueil</span><span style=\"color: navy\"><b> -> </b></span> newAddress.period<b> as </b><span style=\"color: maroon\">newAddressPeriod</span><span style=\"color: navy\">, </span> newAddressPeriod.start = <span style=\"color: maroon\">dateRecueil</span> <i>\"setDateRecueil\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"createAddress\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"checkSource\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">ENCOUNTER TRANSFORMATION</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<b>group </b>TransformEncounter<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtEnc</span><span style=\"color: navy\"> : </span>Encounter, <b>source</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtEnc.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: #b36b00\" title=\"Cet élément n'était pas défini avant R5\">// src.pmsiId as id -> tgt.id = id \"encounter-id\";</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtEnc.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>identifier.type = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'https://hl7.fr/ig/fhir/core/CodeSystem/fr-core-cs-identifier-type'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'VN'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Visit Number'</span><span style=\"color: navy\">)</span> <i>\"idtype\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/pmsi-id'</span> <i>\"encounteridsystem\"</i><span style=\"color: navy\">;</span>#xD;\n src.pmsiId<b> as </b><span style=\"color: maroon\">srcEncoutnerId</span><span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">srcEncoutnerId</span> <i>\"encounteridvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"encounteridentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Status - default to finished for historical data</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtEnc.status = <span style=\"color: blue\">'finished'</span> <i>\"encounterstatus\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Class - assume inpatient for PMSI data</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtEnc.class = <b>c</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/v3-ActCode'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'IMP'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'inpatient encounter'</span><span style=\"color: navy\">)</span> <i>\"encounterclass\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Reference patient</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtEnc.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectreference\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"encountersubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Period</span>#xD;\n src<b> where </b>src.dateDebutSejour.exists() or src.dateFinSejour.exists()<span style=\"color: navy\"><b> -> </b></span>tgtEnc.period<b> as </b><span style=\"color: maroon\">period</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src.dateDebutSejour<b> as </b><span style=\"color: maroon\">startDate</span><span style=\"color: navy\"><b> -> </b></span>period.start = <span style=\"color: maroon\">startDate</span> <i>\"periodstart\"</i><span style=\"color: navy\">;</span>#xD;\n src.dateFinSejour<b> as </b><span style=\"color: maroon\">endDate</span><span style=\"color: navy\"><b> -> </b></span>period.end = <span style=\"color: maroon\">endDate</span> <i>\"periodend\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"encounterperiod\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Désactivé dans le modèle physique // Duration src.dureeSejour as duration -> tgtEnc.length as length then { duration -> length.value = duration \"length-value\"; duration -> length.unit = 'd' \"length-unit\"; duration -> length.system = 'http://unitsofmeasure.org' \"length-system\"; duration -> length.code = 'd' \"length-code\"; } \"encounter-length\";</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Hospitalization</span>#xD;\n src<b> where </b>src.modeEntree.exists() or src.modeSortie.exists()<span style=\"color: navy\"><b> -> </b></span>tgtEnc.hospitalization<b> as </b><span style=\"color: maroon\">hosp</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src.modeEntree<b> as </b><span style=\"color: maroon\">admitSource</span><span style=\"color: navy\"><b> -> </b></span>hosp.admitSource<b> as </b><span style=\"color: maroon\">admitSrc</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> admitSource<span style=\"color: navy\"><b> -> </b></span>admitSrc.text = <span style=\"color: maroon\">admitSource</span> <i>\"admitsourcetext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"admitsource\"</i><span style=\"color: navy\">;</span>#xD;\n src.modeSortie<b> as </b><span style=\"color: maroon\">dischargeDisp</span><span style=\"color: navy\"><b> -> </b></span>hosp.dischargeDisposition<b> as </b><span style=\"color: maroon\">dischargeDsp</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> dischargeDisp<span style=\"color: navy\"><b> -> </b></span>dischargeDsp.text = <span style=\"color: maroon\">dischargeDisp</span> <i>\"dischargedisptext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"dischargedisposition\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"encounterhospitalization\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Service Provider</span>#xD;\n src<b> where </b>src.uniteFonctionnelle.exists() or src.service.exists() or src.etablissement.exists()<span style=\"color: navy\"><b> -> </b></span>tgtEnc.serviceProvider<b> as </b><span style=\"color: maroon\">provider</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>provider.display = <span style=\"color: navy\">(</span>iif(%src.uniteFonctionnelle.exists(), %src.uniteFonctionnelle, iif(%src.service.exists(), %src.service, %src.etablissement))<span style=\"color: navy\">)</span> <i>\"providerdisplay\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"provider\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">// Location - On n'a pas de location à gérer à ce stade (établissement, service et UF, halluciné par l'IA, sont des Organization que j'ai du coup mi dans Provider. ) src.service as service -> tgt.location as location then { service -> location.location as loc then { service -> loc.display = service \"location-display\"; } \"location-ref\"; } \"encounter-location\";</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">CONDITION TRANSFORMATION</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<b>group </b>TransformCondition<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtCond</span><span style=\"color: navy\"> : </span>Condition, <b>source</b> <span style=\"color: maroon\">patient</span>, <b>source</b> <span style=\"color: maroon\">encounter</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtCond.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src.diagnosticId<b> as </b><span style=\"color: maroon\">diagId</span><span style=\"color: navy\"><b> -> </b></span>tgtCond.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> diagId<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/diagnostic-id'</span> <i>\"conditionidsystem\"</i><span style=\"color: navy\">;</span>#xD;\n diagId<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">diagId</span> <i>\"conditionidvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"conditionidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Category</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Représentation des codes diagnostics du PMSI dans condition , plusieurs options :</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">- ce sont des infos de claim, pas de condition</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">- utiliser la catégorie 'encounter-diagnosis'</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">- utiliser les catégories du PMSI : DP, DR, DAS, DAD</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">- mettre les deux précédent <- j'ai fait ça.</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtCond.category = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/condition-category'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'encounter-diagnosis'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Encounter Diagnosis'</span><span style=\"color: navy\">)</span> <i>\"categoryencounterDiag\"</i><span style=\"color: navy\">;</span>#xD;\n src.typeDiagnostic<b> as </b><span style=\"color: maroon\">diagType</span><span style=\"color: navy\"><b> -> </b></span>tgtCond.category<b> as </b><span style=\"color: maroon\">category</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> diagType<span style=\"color: navy\"><b> -> </b></span>category.text = <span style=\"color: maroon\">diagType</span> <i>\"categorytext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"conditioncategory\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Code (ICD-10)</span>#xD;\n src.codeDiagnostic<b> as </b><span style=\"color: maroon\">srcCode</span><span style=\"color: navy\"><b> -> </b></span>tgtCond.code<b> as </b><span style=\"color: maroon\">conditionCode</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> <span style=\"color: navy\">// </span><span style=\"color: green\">la fonction cc ne peuple pas le display...</span>#xD;\n src.libelleDiagnostic<b> as </b><span style=\"color: maroon\">label</span><span style=\"color: navy\"><b> -> </b></span> conditionCode.coding<b> as </b><span style=\"color: maroon\">tgtCoding</span><span style=\"color: navy\">, </span> tgtCoding.system = <span style=\"color: blue\">'http://hl7.org/fhir/sid/icd-10'</span><span style=\"color: navy\">, </span> tgtCoding.code = <span style=\"color: maroon\">srcCode</span> <i>\"conditioncode\"</i><span style=\"color: navy\">;</span>#xD;\n src.libelleDiagnostic<b> as </b><span style=\"color: maroon\">text</span><span style=\"color: navy\"><b> -> </b></span>conditionCode.text = <span style=\"color: maroon\">text</span> <i>\"codetext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"varcode\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Subject</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtCond.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"conditionsubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Encounter reference</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtCond.encounter = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> encounter.id<b> as </b><span style=\"color: maroon\">encounterId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Encounter/' + %encounterId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Encounter'</span> <i>\"encounterref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"conditionencounter\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Recorded date</span>#xD;\n src.dateRecueil<b> as </b><span style=\"color: maroon\">entryDate</span><span style=\"color: navy\"><b> -> </b></span>tgtCond.recordedDate = <span style=\"color: maroon\">entryDate</span> <i>\"conditionrecordeddate\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Clinical status - assume active for recorded diagnoses</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtCond.clinicalStatus = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/condition-clinical'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'active'</span><span style=\"color: navy\">)</span> <i>\"conditionclinicalstatus\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Verification status - assume confirmed for coded diagnoses</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtCond.verificationStatus = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/condition-ver-status'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'confirmed'</span><span style=\"color: navy\">)</span> <i>\"conditionverificationstatus\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">PROCEDURE TRANSFORMATION</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<b>group </b>TransformProcedure<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtProc</span><span style=\"color: navy\"> : </span>Procedure, <b>source</b> <span style=\"color: maroon\">patient</span>, <b>source</b> <span style=\"color: maroon\">encounter</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtProc.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src.acteId<b> as </b><span style=\"color: maroon\">acteId</span><span style=\"color: navy\"><b> -> </b></span>tgtProc.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> acteId<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/acte-id'</span> <i>\"procedureidsystem\"</i><span style=\"color: navy\">;</span>#xD;\n acteId<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">acteId</span> <i>\"procedureidvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"procedureidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Status - assume completed for historical data</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtProc.status = <span style=\"color: blue\">'completed'</span> <i>\"procedurestatus\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Code (CCAM)</span>#xD;\n src.codeActe<b> as </b><span style=\"color: maroon\">code</span><span style=\"color: navy\"><b> -> </b></span>tgtProc.code<b> as </b><span style=\"color: maroon\">procedureCode</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> code<span style=\"color: navy\"><b> -> </b></span> procedureCode.coding<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> coding.system = <span style=\"color: blue\">'https://interop.aphp.fr/ig/fhir/dm/CodeSystem/Ccam'</span><span style=\"color: navy\">, </span> coding.code = <span style=\"color: maroon\">code</span> <i>\"procedurecoding\"</i><span style=\"color: navy\">;</span>#xD;\n src.libelleActe<b> as </b><span style=\"color: maroon\">text</span><span style=\"color: navy\"><b> -> </b></span>procedureCode.text = <span style=\"color: maroon\">text</span> <i>\"codetext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"procedurecode\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Subject</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtProc.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"proceduresubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Encounter reference</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtProc.encounter = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> encounter.id<b> as </b><span style=\"color: maroon\">encounterId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Encounter/' + %encounterId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Encounter'</span> <i>\"encounterref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"procedureencounter\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Performed date/time</span>#xD;\n src.dateActe<b> as </b><span style=\"color: maroon\">performedDate</span><b> where </b>%performedDate.exists()<span style=\"color: navy\"><b> -> </b></span>tgtProc.performed = <span style=\"color: maroon\">performedDate</span> <i>\"procedureperformed\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Performer</span>#xD;\n src.executant<b> as </b><span style=\"color: maroon\">performer</span><span style=\"color: navy\"><b> -> </b></span>tgtProc.performer<b> as </b><span style=\"color: maroon\">perf</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> performer<span style=\"color: navy\"><b> -> </b></span>perf.actor<b> as </b><span style=\"color: maroon\">actor</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> performer<span style=\"color: navy\"><b> -> </b></span>actor.display = <span style=\"color: maroon\">performer</span> <i>\"performerdisplay\"</i><span style=\"color: navy\">;</span>#xD;\n performer<span style=\"color: navy\"><b> -> </b></span>actor.type = <span style=\"color: blue\">'Practitioner'</span> <i>\"performerType\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"performeractor\"</i><span style=\"color: navy\">;</span>#xD;\n performer<span style=\"color: navy\"><b> -> </b></span> perf.function<b> as </b><span style=\"color: maroon\">function</span><span style=\"color: navy\">, </span> function.text = <span style=\"color: blue\">'Exécutant'</span> <i>\"performerFunction\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"procedureperformer\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">LABORATORY OBSERVATION TRANSFORMATION</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<b>group </b>TransformLabObservation<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtObs</span><span style=\"color: navy\"> : </span>Observation, <b>source</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtObs.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src.biologieId<b> as </b><span style=\"color: maroon\">bioId</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> bioId<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/biologie-id'</span> <i>\"labidsystem\"</i><span style=\"color: navy\">;</span>#xD;\n bioId<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">bioId</span> <i>\"labidvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"labidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Status - map validation status or default to final</span>#xD;\n src.statutValidation<b> as </b><span style=\"color: maroon\">validation</span><b> where </b>validation = 'VALIDE'<span style=\"color: navy\"><b> -> </b></span>tgtObs.status = <span style=\"color: blue\">'final'</span> <i>\"statusvalidated\"</i><span style=\"color: navy\">;</span>#xD;\n src<b> where </b>src.statutValidation.exists().not()<span style=\"color: navy\"><b> -> </b></span>tgtObs.status = <span style=\"color: blue\">'final'</span> <i>\"statusdefault\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Category</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.category<b> as </b><span style=\"color: maroon\">category</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>category.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/observation-category'</span> <i>\"categorysystem\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'laboratory'</span> <i>\"categorycode\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.display = <span style=\"color: blue\">'Laboratory'</span> <i>\"categorydisplay\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"categorycoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"labcategory\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Code (LOINC)</span>#xD;\n src.codeLoinc<b> as </b><span style=\"color: maroon\">loinc</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.code<b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> loinc<span style=\"color: navy\"><b> -> </b></span>code.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> loinc<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>\"codesystem\"</i><span style=\"color: navy\">;</span>#xD;\n loinc<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: maroon\">loinc</span> <i>\"codevalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"labcoding\"</i><span style=\"color: navy\">;</span>#xD;\n src.libelleTest<b> as </b><span style=\"color: maroon\">text</span><span style=\"color: navy\"><b> -> </b></span>code.text = <span style=\"color: maroon\">text</span> <i>\"codetext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"labcode\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Subject</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"labsubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Effective date/time</span>#xD;\n src.datePrelevement<b> as </b><span style=\"color: maroon\">collectionDate</span><b> where </b>%collectionDate.exists()<span style=\"color: navy\"><b> -> </b></span>tgtObs.effective = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">collectionDate</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span> <i>\"labeffective\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Value (numeric or text)</span>#xD;\n src.valeur<b> as </b><span style=\"color: maroon\">numValue</span><b> where </b>numValue.exists()<span style=\"color: navy\"><b> -> </b></span>tgtObs.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">qty</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> numValue<span style=\"color: navy\"><b> -> </b></span>qty.value = <span style=\"color: maroon\">numValue</span> <i>\"quantityvalue\"</i><span style=\"color: navy\">;</span>#xD;\n src.unite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>qty.unit = <span style=\"color: maroon\">unit</span> <i>\"quantityunit\"</i><span style=\"color: navy\">;</span>#xD;\n src.unite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>qty.code = <span style=\"color: maroon\">unit</span> <i>\"quantitycode\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>qty.system = <span style=\"color: blue\">'http://unitsofmeasure.org'</span> <i>\"quantitysystem\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"labvaluequantity\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">On n'a pas de résultats textuels de prévu</span>#xD;\n <span style=\"color: #b36b00\" title=\"Cet élément n'était pas défini avant R5\">// src.valeurTexte as textValue where textValue.exists() and src.valeur.exists().not() -> tgtObs.value = textValue \"lab-value-string\";</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Reference range</span>#xD;\n src<b> where </b>src.borneInfNormale.exists() or src.borneSupNormale.exists()<span style=\"color: navy\"><b> -> </b></span>tgtObs.referenceRange<b> as </b><span style=\"color: maroon\">range</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src.borneInfNormale<b> as </b><span style=\"color: maroon\">low</span><span style=\"color: navy\"><b> -> </b></span>range.low<b> as </b><span style=\"color: maroon\">lowQty</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> low<span style=\"color: navy\"><b> -> </b></span>lowQty.value = <span style=\"color: maroon\">low</span> <i>\"reflowvalue\"</i><span style=\"color: navy\">;</span>#xD;\n src.unite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>lowQty.unit = <span style=\"color: maroon\">unit</span> <i>\"reflowunit\"</i><span style=\"color: navy\">;</span>#xD;\n src.unite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>lowQty.code = <span style=\"color: maroon\">unit</span> <i>\"reflowcode\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>lowQty.system = <span style=\"color: blue\">'http://unitsofmeasure.org'</span> <i>\"reflowsystem\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"referencelow\"</i><span style=\"color: navy\">;</span>#xD;\n src.borneSupNormale<b> as </b><span style=\"color: maroon\">high</span><span style=\"color: navy\"><b> -> </b></span>range.high<b> as </b><span style=\"color: maroon\">highQty</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> high<span style=\"color: navy\"><b> -> </b></span>highQty.value = <span style=\"color: maroon\">high</span> <i>\"refhighvalue\"</i><span style=\"color: navy\">;</span>#xD;\n src.unite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>highQty.unit = <span style=\"color: maroon\">unit</span> <i>\"refhighunit\"</i><span style=\"color: navy\">;</span>#xD;\n src.unite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>highQty.code = <span style=\"color: maroon\">unit</span> <i>\"refhighcode\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>highQty.system = <span style=\"color: blue\">'http://unitsofmeasure.org'</span> <i>\"refhighsystem\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"referencehigh\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"labreferencerange\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Performer</span>#xD;\n src.laboratoire<b> as </b><span style=\"color: maroon\">lab</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.performer<b> as </b><span style=\"color: maroon\">performer</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lab<span style=\"color: navy\"><b> -> </b></span>performer.display = <span style=\"color: maroon\">lab</span> <i>\"performerdisplay\"</i><span style=\"color: navy\">;</span>#xD;\n lab<span style=\"color: navy\"><b> -> </b></span>performer.type = <span style=\"color: blue\">'Organization'</span> <i>\"performerType\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"labperformer\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">MEDICATION REQUEST TRANSFORMATION</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<b>group </b>TransformMedicationRequest<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtMedReq</span><span style=\"color: navy\"> : </span>MedicationRequest, <b>source</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtMedReq.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src.prescriptionId<b> as </b><span style=\"color: maroon\">presId</span><span style=\"color: navy\"><b> -> </b></span>tgtMedReq.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> presId<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/prescription-id'</span> <i>\"medrequestidsystem\"</i><span style=\"color: navy\">;</span>#xD;\n presId<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">presId</span> <i>\"medrequestidvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"medrequestidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Status - assume unknown for historical prescriptions</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtMedReq.status = <span style=\"color: blue\">'unknown'</span> <i>\"medrequeststatus\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Intent</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtMedReq.intent = <span style=\"color: blue\">'order'</span> <i>\"medrequestintent\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Subject</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtMedReq.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"medrequestsubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Medication</span>#xD;\n src.denomination<b> as </b><span style=\"color: maroon\">denomination</span><span style=\"color: navy\"><b> -> </b></span>tgtMedReq.medication = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">medication</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> denomination<b> as </b><span style=\"color: maroon\">text</span><span style=\"color: navy\"><b> -> </b></span>medication.text = <span style=\"color: maroon\">text</span> <i>\"medicationtext\"</i><span style=\"color: navy\">;</span>#xD;\n src.codeAtc<b> as </b><span style=\"color: maroon\">atc</span><span style=\"color: navy\"><b> -> </b></span>medication.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> atc<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://www.whocc.no/atc'</span> <i>\"atcsystem\"</i><span style=\"color: navy\">;</span>#xD;\n atc<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: maroon\">atc</span> <i>\"atccode\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"atccoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"medicationdenomination\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Authored date</span>#xD;\n src.datePrescription<b> as </b><span style=\"color: maroon\">prescDate</span><span style=\"color: navy\"><b> -> </b></span>tgtMedReq.authoredOn = <span style=\"color: maroon\">prescDate</span> <i>\"medauthored\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Requester</span>#xD;\n src.prescripteur<b> as </b><span style=\"color: maroon\">prescriber</span><span style=\"color: navy\"><b> -> </b></span>tgtMedReq.requester<b> as </b><span style=\"color: maroon\">requesterRef</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> prescriber<span style=\"color: navy\"><b> -> </b></span>requesterRef.display = <span style=\"color: maroon\">prescriber</span> <i>\"requesterdisplay\"</i><span style=\"color: navy\">;</span>#xD;\n prescriber<span style=\"color: navy\"><b> -> </b></span>requesterRef.type = <span style=\"color: blue\">'Practitioner'</span> <i>\"requesterType\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"medrequester\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">POSOLOGIE TRANSFORMATION</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<b>group </b>setPoso<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">srcPoso</span>, <b>source</b> <span style=\"color: maroon\">srcPres</span>, <b>target</b> <span style=\"color: maroon\">tgtMedReq</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> srcPres<span style=\"color: navy\"><b> -> </b></span>tgtMedReq.dosageInstruction<b> as </b><span style=\"color: maroon\">dosageInstruction</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Human-readable dosage text - construct from available fields</span>#xD;\n srcPoso<span style=\"color: navy\"><b> -> </b></span>dosageInstruction.text = <span style=\"color: navy\">(</span>'Prendre' + iif(%srcPoso.quantite.exists(), ' ' + %srcPoso.quantite.toString(), '1') + iif(%srcPoso.uniteQuantite.exists(), ' ' + %srcPoso.uniteQuantite, ' comprimé') + iif(%srcPoso.nombrePrisesParJour.exists(), ' ' + %srcPoso.nombrePrisesParJour.toString() + ' fois par jour', ' selon prescription')<span style=\"color: navy\">)</span> <i>\"dosagetext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Route of administration from prescription</span>#xD;\n srcPres.voieAdministration<b> as </b><span style=\"color: maroon\">route</span><span style=\"color: navy\"><b> -> </b></span>dosageInstruction.route<b> as </b><span style=\"color: maroon\">routeCC</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> route<span style=\"color: navy\"><b> -> </b></span>routeCC.coding<b> as </b><span style=\"color: maroon\">routeCoding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> route<span style=\"color: navy\"><b> -> </b></span>routeCoding.code = <span style=\"color: maroon\">route</span> <i>\"routecode\"</i><span style=\"color: navy\">;</span>#xD;\n route<span style=\"color: navy\"><b> -> </b></span>routeCoding.system = <span style=\"color: blue\">'https://smt.esante.gouv.fr/terminologie-standardterms'</span> <i>\"routesystem\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"routecoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"dosageroute\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Timing</span>#xD;\n srcPoso<span style=\"color: navy\"><b> -> </b></span>dosageInstruction.timing<b> as </b><span style=\"color: maroon\">timing</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> srcPoso<span style=\"color: navy\"><b> -> </b></span>timing.repeat<b> as </b><span style=\"color: maroon\">timingRepeat</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Set prescription period as bounds if available</span>#xD;\n srcPres<b> where </b>srcPres.dateDebutPrescription.exists() or srcPres.dateFinPrescription.exists()<span style=\"color: navy\"><b> -> </b></span>timingRepeat.bounds = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Period'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">medReqPeriod</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> srcPres.dateDebutPrescription<b> as </b><span style=\"color: maroon\">startDate</span><span style=\"color: navy\"><b> -> </b></span>medReqPeriod.start = <span style=\"color: maroon\">startDate</span> <i>\"periodstart\"</i><span style=\"color: navy\">;</span>#xD;\n srcPres.dateFinPrescription<b> as </b><span style=\"color: maroon\">endDate</span><span style=\"color: navy\"><b> -> </b></span>medReqPeriod.end = <span style=\"color: maroon\">endDate</span> <i>\"periodend\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"prescriptionperiod\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Frequency from posology</span>#xD;\n srcPoso.nombrePrisesParJour<b> as </b><span style=\"color: maroon\">frequency</span><span style=\"color: navy\"><b> -> </b></span>timingRepeat.frequency = <span style=\"color: maroon\">frequency</span> <i>\"timingfrequency\"</i><span style=\"color: navy\">;</span>#xD;\n srcPoso.nombrePrisesParJour<b> as </b><span style=\"color: maroon\">frequency</span><span style=\"color: navy\"><b> -> </b></span>timingRepeat.period = <span style=\"color: blue\">'1'</span> <i>\"timingperiod\"</i><span style=\"color: navy\">;</span>#xD;\n srcPoso.nombrePrisesParJour<b> as </b><span style=\"color: maroon\">frequency</span><span style=\"color: navy\"><b> -> </b></span>timingRepeat.periodUnit = <span style=\"color: blue\">'d'</span> <i>\"timingperiodunit\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"timingrepeat\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"dosagetiming\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Dose and rate</span>#xD;\n srcPoso.quantite<b> as </b><span style=\"color: maroon\">quantity</span><span style=\"color: navy\"><b> -> </b></span>dosageInstruction.doseAndRate<b> as </b><span style=\"color: maroon\">doseRate</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> quantity<span style=\"color: navy\"><b> -> </b></span>doseRate.dose = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">doseQuantity</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> quantity<span style=\"color: navy\"><b> -> </b></span>doseQuantity.value = <span style=\"color: maroon\">quantity</span> <i>\"dosevalue\"</i><span style=\"color: navy\">;</span>#xD;\n srcPoso.uniteQuantite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>doseQuantity.unit = <span style=\"color: maroon\">unit</span> <i>\"doseunit\"</i><span style=\"color: navy\">;</span>#xD;\n srcPoso.uniteQuantite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>doseQuantity.code = <span style=\"color: maroon\">unit</span> <i>\"dosecode\"</i><span style=\"color: navy\">;</span>#xD;\n srcPoso<span style=\"color: navy\"><b> -> </b></span>doseQuantity.system = <span style=\"color: blue\">'http://unitsofmeasure.org'</span> <i>\"dosesystem\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"dosequantity\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"doseandrate\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"dosageinstruction\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">VITAL SIGNS TRANSFORMATION</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<b>group </b>TransformVitalSigns<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtObs</span><span style=\"color: navy\"> : </span>Observation, <b>source</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtObs.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src.soinId<b> as </b><span style=\"color: maroon\">soinId</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> soinId<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/soin-id'</span> <i>\"soinidsystem\"</i><span style=\"color: navy\">;</span>#xD;\n soinId<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">soinId</span> <i>\"soinidvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"medrequestidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Status - assume final</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.status = <span style=\"color: blue\">'final'</span> <i>\"status\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Category - vital-signs</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.category<b> as </b><span style=\"color: maroon\">category</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>category.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/observation-category'</span> <i>\"categorysystem\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'vital-signs'</span> <i>\"categorycode\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"categorycoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"category\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">code (LOINC)</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.code<b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>code.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>\"codesystem\"</i><span style=\"color: navy\">;</span>#xD;\n src.codeLoinc<b> as </b><span style=\"color: maroon\">codeLoinc</span><span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: maroon\">codeLoinc</span> <i>\"codevalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"coding\"</i><span style=\"color: navy\">;</span>#xD;\n src.libelleTest<b> as </b><span style=\"color: maroon\">label</span><span style=\"color: navy\"><b> -> </b></span>code.text = <span style=\"color: maroon\">label</span> <i>\"codetext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"code\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Subject</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"obssubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Date de l'observation</span>#xD;\n src.dateMesure<b> as </b><span style=\"color: maroon\">date</span><b> where </b>%date.exists()<span style=\"color: navy\"><b> -> </b></span>tgtObs.effective = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">date</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span> <i>\"effective\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Valeur (quantitiative)</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">qty</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src.valeur<b> as </b><span style=\"color: maroon\">mesure</span><span style=\"color: navy\"><b> -> </b></span>qty.value = <span style=\"color: maroon\">mesure</span> <i>\"value\"</i><span style=\"color: navy\">;</span>#xD;\n src.unite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>qty.unit = <span style=\"color: maroon\">unit</span> <i>\"unit\"</i><span style=\"color: navy\">;</span>#xD;\n src.unite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>qty.code = <span style=\"color: maroon\">unit</span> <i>\"code\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>qty.system = <span style=\"color: blue\">'http://unitsofmeasure.org'</span> <i>\"system\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"quantity\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">Blood pressure observation - would need separate entry with components</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">LIFESTYLE TRANSFORMATION - SEPARATE OBSERVATIONS</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<b>group </b>TransformTobaccoObservation<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtObs</span><span style=\"color: navy\"> : </span>Observation, <b>source</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtObs.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src.styleVieId<b> as </b><span style=\"color: maroon\">lsId</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lsId<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/lifestyle-id'</span> <i>\"lifestyleidsystem\"</i><span style=\"color: navy\">;</span>#xD;\n lsId<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: navy\">(</span>%lsId & '-tobacco'<span style=\"color: navy\">)</span> <i>\"lifestyleidvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestyleidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Status</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.status = <span style=\"color: blue\">'final'</span> <i>\"lifestylestatus\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Category - social-history</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.category<b> as </b><span style=\"color: maroon\">category</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>category.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/observation-category'</span> <i>\"categorysystem\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'social-history'</span> <i>\"categorycode\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.display = <span style=\"color: blue\">'Social History'</span> <i>\"categorydisplay\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"categorycoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestylecategory\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Code - tobacco use status</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.code<b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>code.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>\"codesystem\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'72166-2'</span> <i>\"codevalue\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.display = <span style=\"color: blue\">'Tobacco smoking status'</span> <i>\"codedisplay\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"tobaccocoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"tobaccocode\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Subject</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestylesubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Effective date</span>#xD;\n src.dateRecueil<b> as </b><span style=\"color: maroon\">collectDate</span><b> where </b>%collectDate.exists()<span style=\"color: navy\"><b> -> </b></span>tgtObs.effective = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">collectDate</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span> <i>\"lifestyleeffective\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Value</span>#xD;\n src.consommationTabac<b> as </b><span style=\"color: maroon\">tobacco</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">valueCC</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> tobacco<span style=\"color: navy\"><b> -> </b></span>valueCC.text = <span style=\"color: maroon\">tobacco</span> <i>\"tobaccovaluetext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"tobaccovalue\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>TransformAlcoholObservation<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtObs</span><span style=\"color: navy\"> : </span>Observation, <b>source</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtObs.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src.styleVieId<b> as </b><span style=\"color: maroon\">lsId</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lsId<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/lifestyle-id'</span> <i>\"lifestyleidsystem\"</i><span style=\"color: navy\">;</span>#xD;\n lsId<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: navy\">(</span>%lsId & '-alcohol'<span style=\"color: navy\">)</span> <i>\"lifestyleidvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestyleidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Status</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.status = <span style=\"color: blue\">'final'</span> <i>\"lifestylestatus\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Category - social-history</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.category<b> as </b><span style=\"color: maroon\">category</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>category.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/observation-category'</span> <i>\"categorysystem\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'social-history'</span> <i>\"categorycode\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.display = <span style=\"color: blue\">'Social History'</span> <i>\"categorydisplay\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"categorycoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestylecategory\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Code - alcohol use</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.code<b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>code.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>\"codesystem\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'11331-6'</span> <i>\"codevalue\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.display = <span style=\"color: blue\">'History of alcohol use'</span> <i>\"codedisplay\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"alcoholcoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"alcoholcode\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Subject</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestylesubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Effective date</span>#xD;\n src.dateRecueil<b> as </b><span style=\"color: maroon\">collectDate</span><b> where </b>%collectDate.exists()<span style=\"color: navy\"><b> -> </b></span>tgtObs.effective = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">collectDate</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span> <i>\"lifestyleeffective\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Value</span>#xD;\n src.consommationAlcool<b> as </b><span style=\"color: maroon\">alcohol</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">valueCC</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> alcohol<span style=\"color: navy\"><b> -> </b></span>valueCC.text = <span style=\"color: maroon\">alcohol</span> <i>\"alcoholvaluetext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"alcoholvalue\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>TransformDrugObservation<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtObs</span><span style=\"color: navy\"> : </span>Observation, <b>source</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtObs.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src.styleVieId<b> as </b><span style=\"color: maroon\">lsId</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lsId<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/lifestyle-id'</span> <i>\"lifestyleidsystem\"</i><span style=\"color: navy\">;</span>#xD;\n lsId<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: navy\">(</span>%lsId & '-drugs'<span style=\"color: navy\">)</span> <i>\"lifestyleidvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestyleidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Status</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.status = <span style=\"color: blue\">'final'</span> <i>\"lifestylestatus\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Category - social-history</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.category<b> as </b><span style=\"color: maroon\">category</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>category.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/observation-category'</span> <i>\"categorysystem\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'social-history'</span> <i>\"categorycode\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.display = <span style=\"color: blue\">'Social History'</span> <i>\"categorydisplay\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"categorycoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestylecategory\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Code - drug use</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.code<b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>code.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>\"codesystem\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'11342-3'</span> <i>\"codevalue\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.display = <span style=\"color: blue\">'History of drug use'</span> <i>\"codedisplay\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"drugcoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"drugcode\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Subject</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestylesubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Effective date</span>#xD;\n src.dateRecueil<b> as </b><span style=\"color: maroon\">collectDate</span><b> where </b>%collectDate.exists()<span style=\"color: navy\"><b> -> </b></span>tgtObs.effective = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">collectDate</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span> <i>\"lifestyleeffective\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Value</span>#xD;\n src.consommationAutresDrogues<b> as </b><span style=\"color: maroon\">drugs</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">valueCC</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> drugs<span style=\"color: navy\"><b> -> </b></span>valueCC.text = <span style=\"color: maroon\">drugs</span> <i>\"drugvaluetext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"drugvalue\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>TransformPhysicalActivityObservation<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtObs</span><span style=\"color: navy\"> : </span>Observation, <b>source</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtObs.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src.styleVieId<b> as </b><span style=\"color: maroon\">lsId</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> lsId<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/lifestyle-id'</span> <i>\"lifestyleidsystem\"</i><span style=\"color: navy\">;</span>#xD;\n lsId<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: navy\">(</span>%lsId & '-physical'<span style=\"color: navy\">)</span> <i>\"lifestyleidvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestyleidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Status</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.status = <span style=\"color: blue\">'final'</span> <i>\"lifestylestatus\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Category - social-history</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.category<b> as </b><span style=\"color: maroon\">category</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>category.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/observation-category'</span> <i>\"categorysystem\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'social-history'</span> <i>\"categorycode\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.display = <span style=\"color: blue\">'Social History'</span> <i>\"categorydisplay\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"categorycoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestylecategory\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Code - physical activity</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.code<b> as </b><span style=\"color: maroon\">code</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>code.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://loinc.org'</span> <i>\"codesystem\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: blue\">'67504-6'</span> <i>\"codevalue\"</i><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>coding.display = <span style=\"color: blue\">'Exercise activity'</span> <i>\"codedisplay\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"physicalcoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"physicalcode\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Subject</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtObs.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"lifestylesubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Effective date</span>#xD;\n src.dateRecueil<b> as </b><span style=\"color: maroon\">collectDate</span><b> where </b>%collectDate.exists()<span style=\"color: navy\"><b> -> </b></span>tgtObs.effective = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">collectDate</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span> <i>\"lifestyleeffective\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Value</span>#xD;\n src.activitePhysique<b> as </b><span style=\"color: maroon\">physical</span><span style=\"color: navy\"><b> -> </b></span>tgtObs.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">valueCC</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> physical<span style=\"color: navy\"><b> -> </b></span>valueCC.text = <span style=\"color: maroon\">physical</span> <i>\"physicalvaluetext\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"physicalvalue\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">MEDICATION ADMINISTRATION TRANSFORMATION</span>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">========================================================================</span>#xD;\n<b>group </b>TransformMedicationAdministrationWOOrder<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtMedAdmin</span><span style=\"color: navy\"> : </span>MedicationAdministration, <b>source</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>tgtMedAdmin.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>\"setId\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Identifier</span>#xD;\n src.administrationId<b> as </b><span style=\"color: maroon\">adminId</span><span style=\"color: navy\"><b> -> </b></span>tgtMedAdmin.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> adminId<span style=\"color: navy\"><b> -> </b></span>identifier.system = <span style=\"color: blue\">'https://hospital.eu/ehr/administration-id'</span> <i>\"adminidsystem\"</i><span style=\"color: navy\">;</span>#xD;\n adminId<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">adminId</span> <i>\"adminidvalue\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"adminidentifier\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Status - assume completed</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtMedAdmin.status = <span style=\"color: blue\">'completed'</span> <i>\"adminstatus\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Subject</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtMedAdmin.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> patient.id<b> as </b><span style=\"color: maroon\">patientId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'Patient/' + %patientId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'Patient'</span> <i>\"subjectref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"adminsubject\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Medication</span>#xD;\n src.denomination<b> as </b><span style=\"color: maroon\">denomination</span><span style=\"color: navy\"><b> -> </b></span>tgtMedAdmin.medication = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">medication</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> denomination<span style=\"color: navy\"><b> -> </b></span>medication.text = <span style=\"color: maroon\">denomination</span> <i>\"medicationtext\"</i><span style=\"color: navy\">;</span>#xD;\n src.codeAtc<b> as </b><span style=\"color: maroon\">atc</span><span style=\"color: navy\"><b> -> </b></span>medication.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> atc<span style=\"color: navy\"><b> -> </b></span>coding.system = <span style=\"color: blue\">'http://www.whocc.no/atc'</span> <i>\"atcsystem\"</i><span style=\"color: navy\">;</span>#xD;\n atc<span style=\"color: navy\"><b> -> </b></span>coding.code = <span style=\"color: maroon\">atc</span> <i>\"atccode\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"atccoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"adminmedication\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Effective period</span>#xD;\n src<b> where </b>src.dateHeureDebut.exists() or src.dateHeureFin.exists()<span style=\"color: navy\"><b> -> </b></span>tgtMedAdmin.effective = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Period'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">period</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src.dateHeureDebut<b> as </b><span style=\"color: maroon\">startDate</span><span style=\"color: navy\"><b> -> </b></span>period.start = <span style=\"color: maroon\">startDate</span> <i>\"periodstart\"</i><span style=\"color: navy\">;</span>#xD;\n src.dateHeureFin<b> as </b><span style=\"color: maroon\">endDate</span><span style=\"color: navy\"><b> -> </b></span>period.end = <span style=\"color: maroon\">endDate</span> <i>\"periodend\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"admineffective\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Dosage</span>#xD;\n src<b> where </b>src.quantite.exists() or src.voieAdministration.exists()<span style=\"color: navy\"><b> -> </b></span>tgtMedAdmin.dosage<b> as </b><span style=\"color: maroon\">dosage</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src.quantite<b> as </b><span style=\"color: maroon\">quantity</span><span style=\"color: navy\"><b> -> </b></span>dosage.dose = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dose</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> quantity<span style=\"color: navy\"><b> -> </b></span>dose.value = <span style=\"color: maroon\">quantity</span> <i>\"dosevalue\"</i><span style=\"color: navy\">;</span>#xD;\n src.uniteQuantite<b> as </b><span style=\"color: maroon\">unit</span><span style=\"color: navy\"><b> -> </b></span>dose.unit = <span style=\"color: maroon\">unit</span> <i>\"doseunit\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"admindose\"</i><span style=\"color: navy\">;</span>#xD;\n src.voieAdministration<b> as </b><span style=\"color: maroon\">route</span><span style=\"color: navy\"><b> -> </b></span>dosage.route<b> as </b><span style=\"color: maroon\">routeCC</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> route<span style=\"color: navy\"><b> -> </b></span>routeCC.coding<b> as </b><span style=\"color: maroon\">routeCoding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> route<span style=\"color: navy\"><b> -> </b></span>routeCoding.code = <span style=\"color: maroon\">route</span> <i>\"routecode\"</i><span style=\"color: navy\">;</span>#xD;\n route<span style=\"color: navy\"><b> -> </b></span>routeCoding.system = <span style=\"color: blue\">'https://smt.esante.gouv.fr/terminologie-standardterms'</span> <i>\"routesystem\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"routecoding\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"dosageroute\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"admindosage\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>TransformMedicationAdministrationWOrder<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgtMedAdmin</span><span style=\"color: navy\"> : </span>MedicationAdministration, <b>source</b> <span style=\"color: maroon\">patient</span>, <b>source</b> <span style=\"color: maroon\">order</span><span style=\"color: navy\">)</span><b> extends </b>TransformMedicationAdministrationWOOrder<span style=\"color: navy\"> {#xD;\n</span> <span style=\"color: navy\">// </span><span style=\"color: green\">Context (encounter) reference</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgtMedAdmin.request = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> order.id<b> as </b><span style=\"color: maroon\">orderId</span><span style=\"color: navy\"><b> -> </b></span> ref.reference = <span style=\"color: navy\">(</span>'MedicationRequest/' + %orderId<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> ref.type = <span style=\"color: blue\">'MedicationRequest'</span> <i>\"encounterref\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"admincontext\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>setEntryRequestAndFullUrl<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">newRes</span>, <b>target</b> <span style=\"color: maroon\">tgtEntry</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> newRes.id<b> as </b><span style=\"color: maroon\">newResId</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> newResId<span style=\"color: navy\"><b> -> </b></span>tgtEntry.fullUrl = <span style=\"color: navy\">(</span>'urn:ehr:' + %newRes.type().name + '/' + %newResId<span style=\"color: navy\">)</span> <i>\"setFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"setResourceType\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span></pre></div>" ] ; fhir:StructureMap.url [ fhir:value "https://interop.aphp.fr/ig/fhir/dm/StructureMap/EHR2FSL"] ; fhir:StructureMap.version [ fhir:value "0.1.0"] ; fhir:StructureMap.name [ fhir:value "EHR2FSL"] ; fhir:StructureMap.title [ fhir:value "Transforms EHR logical model data to FHIR Semantic Layer resources using Bundle as container"] ; fhir:StructureMap.status [ fhir:value "draft"] ; fhir:StructureMap.date [ fhir:value "2026-07-11T15:40:47+00:00"^^xsd:dateTime] ; fhir:StructureMap.publisher [ fhir:value "AP-HP"] ; fhir:StructureMap.contact [ fhir:index 0 ; fhir:ContactDetail.name [ fhir:value "AP-HP" ] ; fhir:ContactDetail.telecom [ fhir:index 0 ; fhir:ContactPoint.system [ fhir:value "url" ] ; fhir:ContactPoint.value [ fhir:value "https://aphp.fr" ] ] ] ; fhir:StructureMap.description [ fhir:value "Transforms EHR logical model data to FHIR Semantic Layer resources using Bundle as container"] ; fhir:StructureMap.jurisdiction [ fhir:index 0 ; fhir:CodeableConcept.coding [ fhir:index 0 ; fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ] ; fhir:Coding.code [ fhir:value "FR" ] ] ] ; fhir:StructureMap.structure [ fhir:index 0 ; fhir:StructureMap.structure.url [ fhir:value "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/ehr" ; fhir:link <https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/ehr> ] ; fhir:StructureMap.structure.mode [ fhir:value "source" ] ; fhir:StructureMap.structure.alias [ fhir:value "EHR" ] ], [ fhir:index 1 ; fhir:StructureMap.structure.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/Bundle" ; fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle> ] ; fhir:StructureMap.structure.mode [ fhir:value "target" ] ; fhir:StructureMap.structure.alias [ fhir:value "Bundle" ] ] ; fhir:StructureMap.group [ fhir:index 0 ; fhir:StructureMap.group.name [ fhir:value "EHR2FSL" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.type [ fhir:value "EHR" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "bundle" ] ; fhir:StructureMap.group.input.type [ fhir:value "Bundle" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "bundleid" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "bundletype" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "collection" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "setTimestamp" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "timestamp" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "now()" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "affectTimestamp" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "timestamp" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "timestamp" ] ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "patiententry" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patient" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "patientEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createpatient" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "patientEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dmPatient" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "transformpatient" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformPatient" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "patient" ; fhir:index 0 ], [ fhir:value "dmPatient" ; fhir:index 1 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "dmPatient" ; fhir:index 0 ], [ fhir:value "patientEntry" ; fhir:index 1 ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "transformpatientAdresse" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "patientAdresse" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientAdresse" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "patientAdresse.patientId = %patient.patientId" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setAddress" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "patientAdresse" ; fhir:index 0 ], [ fhir:value "dmPatient" ; fhir:index 1 ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "encounterentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "donneesPmsi" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "pmsi" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "pmsi.patientId = %patient.patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "encounterEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createencounter" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "pmsi" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "encounterEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dmEncounter" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Encounter" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "transformencounter" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "pmsi" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformEncounter" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "pmsi" ; fhir:index 0 ], [ fhir:value "dmEncounter" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "pmsi" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "dmEncounter" ; fhir:index 0 ], [ fhir:value "encounterEntry" ; fhir:index 1 ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "conditionentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "diagnostics" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "diag" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(diag.patientId = %patient.patientId) and (diag.pmsiId = %pmsi.pmsiId)" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "conditionEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createcondition" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "diag" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "conditionEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dmCondition" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Condition" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "transformcondition" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "diag" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformCondition" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "diag" ; fhir:index 0 ], [ fhir:value "dmCondition" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ], [ fhir:value "dmEncounter" ; fhir:index 3 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "diag" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "dmCondition" ; fhir:index 0 ], [ fhir:value "conditionEntry" ; fhir:index 1 ] ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "procedureentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "actes" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "acte" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(acte.patientId = %patient.patientId) and (acte.pmsiId = %pmsi.pmsiId)" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "procedureEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createprocedure" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "acte" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "procedureEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dmProcedure" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Procedure" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "transformprocedure" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "acte" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformProcedure" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "acte" ; fhir:index 0 ], [ fhir:value "dmProcedure" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ], [ fhir:value "dmEncounter" ; fhir:index 3 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "acte" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "dmProcedure" ; fhir:index 0 ], [ fhir:value "procedureEntry" ; fhir:index 1 ] ] ] ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "labentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "biologie" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "lab" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "lab.patientId = %patient.patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "labEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createlabobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lab" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "labEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dmLab" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Observation" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "transformLabObs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lab" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformLabObservation" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "lab" ; fhir:index 0 ], [ fhir:value "dmLab" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lab" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "dmLab" ; fhir:index 0 ], [ fhir:value "labEntry" ; fhir:index 1 ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "medicationentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "prescription" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "pres" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "pres.patientId = %patient.patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "medReqEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createmedreq" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "pres" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "medReqEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dmMedReq" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "MedicationRequest" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createmedrequest" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformMedicationRequest" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "pres" ; fhir:index 0 ], [ fhir:value "dmMedReq" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "pres" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "dmMedReq" ; fhir:index 0 ], [ fhir:value "medReqEntry" ; fhir:index 1 ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "transformPoso" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "posologie" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "poso" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "%poso.prescriptionId = %pres.prescriptionId" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setPoso" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "poso" ; fhir:index 0 ], [ fhir:value "pres" ; fhir:index 1 ], [ fhir:value "dmMedReq" ; fhir:index 2 ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "administrationentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "administration" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "admin" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(admin.patientId = %patient.patientId) and (admin.prescriptionId = pres.prescriptionId)" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "adminEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createmedadmin" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "admin" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "adminEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dmAdmin" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "MedicationAdministration" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createmedadmin" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "admin" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformMedicationAdministrationWOrder" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "admin" ; fhir:index 0 ], [ fhir:value "dmAdmin" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ], [ fhir:value "dmMedReq" ; fhir:index 3 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "admin" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "dmAdmin" ; fhir:index 0 ], [ fhir:value "adminEntry" ; fhir:index 1 ] ] ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "styleVie" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "lifestyle" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "lifestyle.patientId = %patient.patientId" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "tobaccoentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "consommationTabac" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "tobacco" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "tobacco.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "tobaccoEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createtobaccoobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "tobacco" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tobaccoEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "tobaccoObs" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Observation" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createtobaccoobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformTobaccoObservation" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "lifestyle" ; fhir:index 0 ], [ fhir:value "tobaccoObs" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "tobaccoObs" ; fhir:index 0 ], [ fhir:value "tobaccoEntry" ; fhir:index 1 ] ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "alcoholentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "consommationAlcool" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "alcohol" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "alcohol.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "alcoholEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createalcoholobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "alcohol" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "alcoholEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "alcoholObs" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Observation" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createalcoholobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformAlcoholObservation" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "lifestyle" ; fhir:index 0 ], [ fhir:value "alcoholObs" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "alcoholObs" ; fhir:index 0 ], [ fhir:value "alcoholEntry" ; fhir:index 1 ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "drugentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "consommationAutresDrogues" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "drugs" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "drugs.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "drugEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createdrugobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "drugs" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "drugEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "drugObs" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Observation" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createdrugobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformDrugObservation" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "lifestyle" ; fhir:index 0 ], [ fhir:value "drugObs" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "drugObs" ; fhir:index 0 ], [ fhir:value "drugEntry" ; fhir:index 1 ] ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "physicalentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "activitePhysique" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "physical" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "physical.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "physicalEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createphysicalobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "physical" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "physicalEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "physicalObs" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Observation" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createphysicalobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformPhysicalActivityObservation" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "lifestyle" ; fhir:index 0 ], [ fhir:value "physicalObs" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lifestyle" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "physicalObs" ; fhir:index 0 ], [ fhir:value "physicalEntry" ; fhir:index 1 ] ] ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "vitalentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dossierSoins" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "soin" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "soin.patientId = %patient.patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "vitalEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createmesureobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "soin" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "vitalEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dmObs" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Observation" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createmesureobs" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "soin" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformVitalSigns" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "soin" ; fhir:index 0 ], [ fhir:value "dmObs" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "soin" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "dmObs" ; fhir:index 0 ], [ fhir:value "vitalEntry" ; fhir:index 1 ] ] ] ] ], [ fhir:index 8 ; fhir:StructureMap.group.rule.name [ fhir:value "administrationentries" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "administration" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "admin" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(admin.patientId = %patient.patientId) and admin.prescriptionId.empty()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "adminEntry" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createmedadmin" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "admin" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "adminEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dmAdmin" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "MedicationAdministration" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createmedadmin" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "admin" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "TransformMedicationAdministrationWOOrder" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "admin" ; fhir:index 0 ], [ fhir:value "dmAdmin" ; fhir:index 1 ], [ fhir:value "dmPatient" ; fhir:index 2 ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "admin" ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index 0 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "dmAdmin" ; fhir:index 0 ], [ fhir:value "adminEntry" ; fhir:index 1 ] ] ] ] ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.name [ fhir:value "TransformPatient" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "---------------------------------------------------------\r\nPATIENT TRANSFORMATION\r\n---------------------------------------------------------" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgt" ] ; fhir:StructureMap.group.input.type [ fhir:value "Patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "patientidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "patientId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "pid" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "iduse" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "pid" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "use" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "usual" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "idtype" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "pid" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/v2-0203" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "PI" ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient Identifier" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "idsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "pid" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/patient-id" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "idvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "pid" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "pid" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "insidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "ins" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "ins" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "ins.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "insIdentifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "insuse" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "ins" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "insIdentifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "use" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "official" ] ] ] ; fhir:StructureMap.group.rule.documentation [ fhir:value "On part du principe qu'on n'est pas sur un old." ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "instype" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "ins" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "insIdentifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hl7.fr/ig/fhir/core/CodeSystem/fr-core-cs-v2-0203" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "INS-NIR" ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "NIR définitif" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "inssystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "ins" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "insIdentifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:oid:1.2.250.1.213.1.4.8" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "insvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "ins" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "insIdentifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "ins" ] ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "patientname" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.nom.exists() or src.prenom.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "name" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "familyname" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "nom" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "lastName" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "name" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "family" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "lastName" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "givenname" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "prenom" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "firstName" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "name" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "given" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "firstName" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "nameuse" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "name" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "use" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "official" ] ] ] ; fhir:StructureMap.group.rule.documentation [ fhir:value "hypothèse un peu forte." ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "birthdate" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateNaissance" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "birthDate" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "birthDate" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "birthDate" ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "gendermale" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "sexe" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "gender" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "gender = 'h'" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "gender" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "male" ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "genderfemale" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "sexe" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "gender" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "gender = 'f'" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "gender" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "female" ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "genderunknown" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "sexe" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "gender" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "gender.exists() and (gender != 'h') and (gender != 'f')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "gender" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "unknown" ] ] ] ; fhir:StructureMap.group.rule.documentation [ fhir:value "n'a pas grand sens en l'état des contraintes SQL" ] ], [ fhir:index 8 ; fhir:StructureMap.group.rule.name [ fhir:value "deathDate" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateDeces" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "deathDate" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "deathDate.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "deceased" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "deceasedDate" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cast" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "deathDate" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "dateTime" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "deathSource" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "sourceDeces" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "deathSource" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "deathSource.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "deceasedDate" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "DeathSourceExtension" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "deathSourceUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "deathSource" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "DeathSourceExtension" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "url" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/DeathSource" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "deathSourceValue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "deathSource" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "DeathSourceExtension" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cast" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "deathSource" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "code" ] ] ] ] ] ], [ fhir:index 9 ; fhir:StructureMap.group.rule.name [ fhir:value "multiplebirth" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "rangGemellaire" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "twin" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "twin.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "multipleBirth" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "twin" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.name [ fhir:value "setAddress" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "========================================================================\r\nPATIENT_LOCATION TRANSFORMATION\r\n========================================================================" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtPat" ] ; fhir:StructureMap.group.input.type [ fhir:value "Patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "checkSource" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.latitude.exists() or src.longitude.exists() or src.codeIris.exists() or src.libelleIris.exists() or src.codeGeographiqueResidence.exists()" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "createAddress" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtPat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "address" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "newAddress" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setCoordinates" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.latitude.exists() or src.longitude.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "newAddress" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "geolocationExtension" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "geolocationExtension" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "url" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://hl7.org/fhir/StructureDefinition/geolocation" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setLat" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "latitude" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "srcLat" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "geolocationExtension" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "tgtLat" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtLat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "url" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "latitude" ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtLat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "srcLat" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setLong" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "longitude" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "srcLong" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "geolocationExtension" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "tgtLong" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtLong" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "url" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "longitude" ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtLong" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "srcLong" ] ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "setIris" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.codeIris.exists() or src.libelleIris.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "newAddress" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "line" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "irisLine" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%src.libelleIris" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "irisLine" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "irisExtension" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Extension" ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.context [ fhir:value "irisExtension" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "url" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract" ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.target.context [ fhir:value "irisExtension" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%src.codeIris" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "SetResidencePmsi" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "codeGeographiqueResidence" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "srcCodeGeographiqueResidence" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.codeGeographiqueResidence.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "newAddress" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "residencePmsiExtension" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "residencePmsiExtension" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "url" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/PmsiCodeGeo" ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.context [ fhir:value "residencePmsiExtension" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cast" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "srcCodeGeographiqueResidence" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "code" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "setDateRecueil" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateRecueil" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "dateRecueil" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "newAddress" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "period" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "newAddressPeriod" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "newAddressPeriod" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "start" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "dateRecueil" ] ] ] ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.name [ fhir:value "TransformEncounter" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "========================================================================\r\nENCOUNTER TRANSFORMATION\r\n========================================================================" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtEnc" ] ; fhir:StructureMap.group.input.type [ fhir:value "Encounter" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtEnc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "encounteridentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtEnc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "idtype" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hl7.fr/ig/fhir/core/CodeSystem/fr-core-cs-identifier-type" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "VN" ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Visit Number" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "encounteridsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/pmsi-id" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "encounteridvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "pmsiId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "srcEncoutnerId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "srcEncoutnerId" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "encounterstatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtEnc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "finished" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "encounterclass" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtEnc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "class" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "c" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-ActCode" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "IMP" ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "inpatient encounter" ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "encountersubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtEnc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectreference" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "encounterperiod" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.dateDebutSejour.exists() or src.dateFinSejour.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtEnc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "period" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "period" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "periodstart" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateDebutSejour" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "startDate" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "period" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "start" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "startDate" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "periodend" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateFinSejour" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "endDate" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "period" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "end" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "endDate" ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "encounterhospitalization" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.modeEntree.exists() or src.modeSortie.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtEnc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "hospitalization" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "hosp" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "admitsource" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "modeEntree" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "admitSource" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "hosp" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "admitSource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "admitSrc" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "admitsourcetext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "admitSource" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "admitSrc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "admitSource" ] ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "dischargedisposition" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "modeSortie" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "dischargeDisp" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "hosp" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "dischargeDisposition" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dischargeDsp" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "dischargedisptext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "dischargeDisp" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "dischargeDsp" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "dischargeDisp" ] ] ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "provider" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.uniteFonctionnelle.exists() or src.service.exists() or src.etablissement.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtEnc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "serviceProvider" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "provider" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "providerdisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "provider" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "iif(%src.uniteFonctionnelle.exists(), %src.uniteFonctionnelle, iif(%src.service.exists(), %src.service, %src.etablissement))" ] ] ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.name [ fhir:value "TransformCondition" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "========================================================================\r\nCONDITION TRANSFORMATION\r\n========================================================================" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.input.type [ fhir:value "Condition" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 3 ; fhir:StructureMap.group.input.name [ fhir:value "encounter" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "conditionidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "diagnosticId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "diagId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "conditionidsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "diagId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/diagnostic-id" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "conditionidvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "diagId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "diagId" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "categoryencounterDiag" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-category" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "encounter-diagnosis" ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Encounter Diagnosis" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "conditioncategory" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "typeDiagnostic" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "diagType" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "category" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorytext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "diagType" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "diagType" ] ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "varcode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "codeDiagnostic" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "srcCode" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "conditionCode" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "conditioncode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "libelleDiagnostic" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "label" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "conditionCode" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "tgtCoding" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCoding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://hl7.org/fhir/sid/icd-10" ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCoding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "srcCode" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "codetext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "libelleDiagnostic" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "text" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "conditionCode" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "text" ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "conditionsubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "conditionencounter" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "encounter" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "encounterref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "encounter" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "encounterId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Encounter/' + %encounterId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Encounter" ] ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "conditionrecordeddate" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateRecueil" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "entryDate" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "recordedDate" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "entryDate" ] ] ] ], [ fhir:index 8 ; fhir:StructureMap.group.rule.name [ fhir:value "conditionclinicalstatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "clinicalStatus" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-clinical" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "active" ] ] ] ], [ fhir:index 9 ; fhir:StructureMap.group.rule.name [ fhir:value "conditionverificationstatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtCond" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "verificationStatus" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-ver-status" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "confirmed" ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.name [ fhir:value "TransformProcedure" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "========================================================================\r\nPROCEDURE TRANSFORMATION\r\n========================================================================" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtProc" ] ; fhir:StructureMap.group.input.type [ fhir:value "Procedure" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 3 ; fhir:StructureMap.group.input.name [ fhir:value "encounter" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtProc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "procedureidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "acteId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "acteId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtProc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "procedureidsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "acteId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/acte-id" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "procedureidvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "acteId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "acteId" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "procedurestatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtProc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "completed" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "procedurecode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "codeActe" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "code" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtProc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "procedureCode" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "procedurecoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "code" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "procedureCode" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://interop.aphp.fr/ig/fhir/dm/CodeSystem/Ccam" ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "code" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "codetext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "libelleActe" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "text" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "procedureCode" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "text" ] ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "proceduresubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtProc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "procedureencounter" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtProc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "encounter" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "encounterref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "encounter" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "encounterId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Encounter/' + %encounterId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Encounter" ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "procedureperformed" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateActe" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "performedDate" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "%performedDate.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtProc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "performed" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "performedDate" ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "procedureperformer" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "executant" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "performer" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtProc" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "performer" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "perf" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "performeractor" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "performer" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "perf" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "actor" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "actor" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "performerdisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "performer" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "actor" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "performer" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "performerType" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "performer" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "actor" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Practitioner" ] ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "performerFunction" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "performer" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "perf" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "function" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "function" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "function" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Exécutant" ] ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.name [ fhir:value "TransformLabObservation" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "========================================================================\r\nLABORATORY OBSERVATION TRANSFORMATION\r\n========================================================================" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.input.type [ fhir:value "Observation" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "labidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "biologieId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "bioId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "labidsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "bioId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/biologie-id" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "labidvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "bioId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "bioId" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "statusvalidated" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "statutValidation" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "validation" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "validation = 'VALIDE'" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "final" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "statusdefault" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.statutValidation.exists().not()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "final" ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "labcategory" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "category" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorysystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/observation-category" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "laboratory" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "categorydisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Laboratory" ] ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "labcode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "codeLoinc" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "loinc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "code" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "labcoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "loinc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "codesystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "loinc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://loinc.org" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "codevalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "loinc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "loinc" ] ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "codetext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "libelleTest" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "text" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "text" ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "labsubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "labeffective" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "datePrelevement" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "collectionDate" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "%collectionDate.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "effective" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cast" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "collectionDate" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "dateTime" ] ] ] ], [ fhir:index 8 ; fhir:StructureMap.group.rule.name [ fhir:value "labvaluequantity" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "valeur" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "numValue" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "numValue.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "qty" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Quantity" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "quantityvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "numValue" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "qty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "numValue" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "quantityunit" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "unite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "qty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "unit" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "quantitycode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "unite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "qty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "quantitysystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "qty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://unitsofmeasure.org" ] ] ] ] ], [ fhir:index 9 ; fhir:StructureMap.group.rule.name [ fhir:value "labreferencerange" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.borneInfNormale.exists() or src.borneSupNormale.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "referenceRange" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "range" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "referencelow" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "borneInfNormale" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "low" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "range" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "low" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "lowQty" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "reflowvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "low" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "lowQty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "low" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "reflowunit" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "unite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "lowQty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "unit" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "reflowcode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "unite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "lowQty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "reflowsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "lowQty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://unitsofmeasure.org" ] ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "referencehigh" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "borneSupNormale" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "high" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "range" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "high" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "highQty" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "refhighvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "high" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "highQty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "high" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "refhighunit" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "unite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "highQty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "unit" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "refhighcode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "unite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "highQty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "refhighsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "highQty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://unitsofmeasure.org" ] ] ] ] ] ], [ fhir:index 10 ; fhir:StructureMap.group.rule.name [ fhir:value "labperformer" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "laboratoire" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "lab" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "performer" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "performer" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "performerdisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lab" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "performer" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "lab" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "performerType" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lab" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "performer" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Organization" ] ] ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.name [ fhir:value "TransformMedicationRequest" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "========================================================================\r\nMEDICATION REQUEST TRANSFORMATION\r\n========================================================================" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.input.type [ fhir:value "MedicationRequest" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "medrequestidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "prescriptionId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "presId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "medrequestidsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "presId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/prescription-id" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "medrequestidvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "presId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "presId" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "medrequeststatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "unknown" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "medrequestintent" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "intent" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "order" ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "medrequestsubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "medicationdenomination" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "denomination" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "denomination" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "medication" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "medication" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "medicationtext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "denomination" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "text" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "medication" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "text" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "atccoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "codeAtc" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "atc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "medication" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "atcsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "atc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://www.whocc.no/atc" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "atccode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "atc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "atc" ] ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "medauthored" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "datePrescription" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "prescDate" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "authoredOn" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "prescDate" ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "medrequester" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "prescripteur" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "prescriber" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "requester" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "requesterRef" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "requesterdisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "prescriber" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "requesterRef" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "prescriber" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "requesterType" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "prescriber" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "requesterRef" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Practitioner" ] ] ] ] ] ], [ fhir:index 8 ; fhir:StructureMap.group.name [ fhir:value "setPoso" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "========================================================================\r\nPOSOLOGIE TRANSFORMATION\r\n========================================================================" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "srcPoso" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "srcPres" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "dosageinstruction" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPres" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedReq" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "dosageInstruction" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dosageInstruction" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "dosagetext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPoso" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "dosageInstruction" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Prendre' + iif(%srcPoso.quantite.exists(), ' ' + %srcPoso.quantite.toString(), '1') + iif(%srcPoso.uniteQuantite.exists(), ' ' + %srcPoso.uniteQuantite, ' comprimé') + iif(%srcPoso.nombrePrisesParJour.exists(), ' ' + %srcPoso.nombrePrisesParJour.toString() + ' fois par jour', ' selon prescription')" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "dosageroute" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPres" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "voieAdministration" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "route" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "dosageInstruction" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "route" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "routeCC" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "routecoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "route" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "routeCC" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "routeCoding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "routecode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "route" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "routeCoding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "route" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "routesystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "route" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "routeCoding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://smt.esante.gouv.fr/terminologie-standardterms" ] ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "dosagetiming" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPoso" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "dosageInstruction" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "timing" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "timing" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "timingrepeat" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPoso" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "timing" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "repeat" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "timingRepeat" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "prescriptionperiod" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPres" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "srcPres.dateDebutPrescription.exists() or srcPres.dateFinPrescription.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "timingRepeat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "bounds" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "medReqPeriod" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Period" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "periodstart" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPres" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateDebutPrescription" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "startDate" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "medReqPeriod" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "start" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "startDate" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "periodend" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPres" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateFinPrescription" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "endDate" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "medReqPeriod" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "end" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "endDate" ] ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "timingfrequency" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPoso" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "nombrePrisesParJour" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "frequency" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "timingRepeat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "frequency" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "frequency" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "timingperiod" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPoso" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "nombrePrisesParJour" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "frequency" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "timingRepeat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "period" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "1" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "timingperiodunit" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPoso" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "nombrePrisesParJour" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "frequency" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "timingRepeat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "periodUnit" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "d" ] ] ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "doseandrate" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPoso" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "quantite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "quantity" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "dosageInstruction" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "doseAndRate" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "doseRate" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "dosequantity" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "quantity" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "doseRate" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "dose" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "doseQuantity" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Quantity" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "dosevalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "quantity" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "doseQuantity" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "quantity" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "doseunit" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPoso" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "uniteQuantite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "doseQuantity" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "unit" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "dosecode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPoso" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "uniteQuantite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "doseQuantity" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "dosesystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "srcPoso" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "doseQuantity" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://unitsofmeasure.org" ] ] ] ] ] ] ] ], [ fhir:index 9 ; fhir:StructureMap.group.name [ fhir:value "TransformVitalSigns" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "========================================================================\r\nVITAL SIGNS TRANSFORMATION\r\n========================================================================" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.input.type [ fhir:value "Observation" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "medrequestidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "soinId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "soinId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "soinidsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "soinId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/soin-id" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "soinidvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "soinId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "soinId" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "status" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "final" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "category" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "category" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorysystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/observation-category" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "vital-signs" ] ] ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "code" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "code" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "codesystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://loinc.org" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "codevalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "codeLoinc" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "codeLoinc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "codeLoinc" ] ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "codetext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "libelleTest" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "label" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "label" ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "obssubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "effective" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateMesure" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "date" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "%date.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "effective" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cast" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "date" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "dateTime" ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "quantity" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "qty" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Quantity" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "value" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "valeur" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "mesure" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "qty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "mesure" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "unit" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "unite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "qty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "unit" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "code" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "unite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "qty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "system" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "qty" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://unitsofmeasure.org" ] ] ] ] ] ], [ fhir:index 10 ; fhir:StructureMap.group.name [ fhir:value "TransformTobaccoObservation" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "========================================================================\r\nLIFESTYLE TRANSFORMATION - SEPARATE OBSERVATIONS\r\n========================================================================" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.input.type [ fhir:value "Observation" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "styleVieId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/lifestyle-id" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%lsId & '-tobacco'" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylestatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "final" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylecategory" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "category" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorysystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/observation-category" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "social-history" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "categorydisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Social History" ] ] ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "tobaccocode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "code" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "tobaccocoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "codesystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://loinc.org" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "codevalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "72166-2" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "codedisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Tobacco smoking status" ] ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylesubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleeffective" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateRecueil" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "collectDate" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "%collectDate.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "effective" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cast" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "collectDate" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "dateTime" ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "tobaccovalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "consommationTabac" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "tobacco" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "valueCC" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "tobaccovaluetext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "tobacco" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "valueCC" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "tobacco" ] ] ] ] ] ], [ fhir:index 11 ; fhir:StructureMap.group.name [ fhir:value "TransformAlcoholObservation" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.input.type [ fhir:value "Observation" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "styleVieId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/lifestyle-id" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%lsId & '-alcohol'" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylestatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "final" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylecategory" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "category" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorysystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/observation-category" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "social-history" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "categorydisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Social History" ] ] ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "alcoholcode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "code" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "alcoholcoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "codesystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://loinc.org" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "codevalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "11331-6" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "codedisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "History of alcohol use" ] ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylesubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleeffective" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateRecueil" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "collectDate" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "%collectDate.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "effective" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cast" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "collectDate" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "dateTime" ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "alcoholvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "consommationAlcool" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "alcohol" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "valueCC" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "alcoholvaluetext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "alcohol" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "valueCC" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "alcohol" ] ] ] ] ] ], [ fhir:index 12 ; fhir:StructureMap.group.name [ fhir:value "TransformDrugObservation" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.input.type [ fhir:value "Observation" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "styleVieId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/lifestyle-id" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%lsId & '-drugs'" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylestatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "final" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylecategory" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "category" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorysystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/observation-category" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "social-history" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "categorydisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Social History" ] ] ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "drugcode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "code" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "drugcoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "codesystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://loinc.org" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "codevalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "11342-3" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "codedisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "History of drug use" ] ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylesubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleeffective" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateRecueil" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "collectDate" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "%collectDate.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "effective" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cast" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "collectDate" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "dateTime" ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "drugvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "consommationAutresDrogues" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "drugs" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "valueCC" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "drugvaluetext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "drugs" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "valueCC" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "drugs" ] ] ] ] ] ], [ fhir:index 13 ; fhir:StructureMap.group.name [ fhir:value "TransformPhysicalActivityObservation" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.input.type [ fhir:value "Observation" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "styleVieId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/lifestyle-id" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleidvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "lsId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%lsId & '-physical'" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylestatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "final" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylecategory" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "category" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "category" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "categorysystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/observation-category" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "categorycode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "social-history" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "categorydisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Social History" ] ] ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "physicalcode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "code" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "physicalcoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "codesystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://loinc.org" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "codevalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "67504-6" ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "codedisplay" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Exercise activity" ] ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestylesubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "lifestyleeffective" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateRecueil" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "collectDate" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "%collectDate.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "effective" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cast" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "collectDate" ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "dateTime" ] ] ] ], [ fhir:index 7 ; fhir:StructureMap.group.rule.name [ fhir:value "physicalvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "activitePhysique" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "physical" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtObs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "valueCC" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "physicalvaluetext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "physical" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "valueCC" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "physical" ] ] ] ] ] ], [ fhir:index 14 ; fhir:StructureMap.group.name [ fhir:value "TransformMedicationAdministrationWOOrder" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.documentation [ fhir:value "========================================================================\r\nMEDICATION ADMINISTRATION TRANSFORMATION\r\n========================================================================" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtMedAdmin" ] ; fhir:StructureMap.group.input.type [ fhir:value "MedicationAdministration" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setId" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedAdmin" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "adminidentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "administrationId" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "adminId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedAdmin" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "identifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "adminidsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "adminId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://hospital.eu/ehr/administration-id" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "adminidvalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "adminId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "identifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "adminId" ] ] ] ] ], [ fhir:index 2 ; fhir:StructureMap.group.rule.name [ fhir:value "adminstatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedAdmin" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "completed" ] ] ] ], [ fhir:index 3 ; fhir:StructureMap.group.rule.name [ fhir:value "adminsubject" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedAdmin" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "subjectref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patient" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'Patient/' + %patientId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ] ], [ fhir:index 4 ; fhir:StructureMap.group.rule.name [ fhir:value "adminmedication" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "denomination" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "denomination" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedAdmin" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "medication" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "medication" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "medicationtext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "denomination" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "medication" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "denomination" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "atccoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "codeAtc" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "atc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "medication" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "atcsystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "atc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://www.whocc.no/atc" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "atccode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "atc" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "atc" ] ] ] ] ] ], [ fhir:index 5 ; fhir:StructureMap.group.rule.name [ fhir:value "admineffective" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.dateHeureDebut.exists() or src.dateHeureFin.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedAdmin" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "effective" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "period" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Period" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "periodstart" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateHeureDebut" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "startDate" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "period" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "start" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "startDate" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "periodend" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "dateHeureFin" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "endDate" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "period" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "end" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "endDate" ] ] ] ] ], [ fhir:index 6 ; fhir:StructureMap.group.rule.name [ fhir:value "admindosage" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "src.quantite.exists() or src.voieAdministration.exists()" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedAdmin" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "dosage" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dosage" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "admindose" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "quantite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "quantity" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "dosage" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "dose" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "dose" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Quantity" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "dosevalue" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "quantity" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "dose" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "quantity" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "doseunit" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "uniteQuantite" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "unit" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "dose" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "unit" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "unit" ] ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "dosageroute" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "voieAdministration" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "route" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "dosage" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "route" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "routeCC" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "routecoding" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "route" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "routeCC" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "routeCoding" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "routecode" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "route" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "routeCoding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "route" ] ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.name [ fhir:value "routesystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "route" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "routeCoding" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://smt.esante.gouv.fr/terminologie-standardterms" ] ] ] ] ] ] ] ], [ fhir:index 15 ; fhir:StructureMap.group.name [ fhir:value "TransformMedicationAdministrationWOrder" ] ; fhir:StructureMap.group.extends [ fhir:value "TransformMedicationAdministrationWOOrder" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtMedAdmin" ] ; fhir:StructureMap.group.input.type [ fhir:value "MedicationAdministration" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index 2 ; fhir:StructureMap.group.input.name [ fhir:value "patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 3 ; fhir:StructureMap.group.input.name [ fhir:value "order" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "admincontext" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtMedAdmin" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "request" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "encounterref" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "order" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "orderId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'MedicationRequest/' + %orderId" ] ] ], [ fhir:index 1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "ref" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "MedicationRequest" ] ] ] ] ] ], [ fhir:index 16 ; fhir:StructureMap.group.name [ fhir:value "setEntryRequestAndFullUrl" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index 0 ; fhir:StructureMap.group.input.name [ fhir:value "newRes" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1 ; fhir:StructureMap.group.input.name [ fhir:value "tgtEntry" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setResourceType" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "newRes" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "newResId" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index 0 ; fhir:StructureMap.group.rule.name [ fhir:value "setFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index 0 ; fhir:StructureMap.group.rule.source.context [ fhir:value "newResId" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index 0 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtEntry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index 0 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'urn:ehr:' + %newRes.type().name + '/' + %newResId" ] ] ] ] ] ] . # - ontology header ------------------------------------------------------------ <http://hl7.org/fhir/StructureMap/EHR2FSL.ttl> a owl:Ontology ; owl:imports fhir:fhir.ttl ; owl:versionIRI <http://build.fhir.org/StructureMap/EHR2FSL.ttl> .
IG © 2023+ AP-HP. Package aphp.fhir.fr.dm#0.1.0 based on FHIR 4.0.1. Generated 2026-07-11
Links: Table of Contents |
QA Report
| New Issue
|