Data Management with FHIR
0.1.0 - ci-build France flag

Data Management with FHIR - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: Alignement de l''expression de besoin vers le modèle physique du DPI dans le cadre de l''usage Core - XML Representation

Draft as of 2025-10-23

Raw xml | Download


<StructureMap xmlns="http://hl7.org/fhir">
  <id value="CoreBusiness2Physical"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Narratif généré : StructureMap CoreBusiness2Physical</b></p><a name="CoreBusiness2Physical"> </a><a name="hcCoreBusiness2Physical"> </a><pre class="fml">
<b>map</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreBusiness2Physical<span style="color: navy">&quot; = &quot;</span>CoreBusiness2Physical<span style="color: navy">&quot;

</span><span style="color: navy">// </span><span style="color: green">Alignement de l''expression de besoin vers le modèle physique du DPI dans le cadre de l''usage Core</span>

<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/questionnaireresponse.html" title="QuestionnaireResponse">http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse</a><span style="color: navy">&quot; </span><b>alias </b>QR <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreDataSet<span style="color: navy">&quot; </span><b>alias </b>DataSet <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CorePatient<span style="color: navy">&quot; </span><b>alias </b>PatientTable <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreAddress<span style="color: navy">&quot; </span><b>alias </b>AddressTable <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreSejour<span style="color: navy">&quot; </span><b>alias </b>SejourTable <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreBiology<span style="color: navy">&quot; </span><b>alias </b>BiologyTable <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreClinical<span style="color: navy">&quot; </span><b>alias </b>ClinicalTable <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreDiag<span style="color: navy">&quot; </span><b>alias </b>DiagTable <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreActe<span style="color: navy">&quot; </span><b>alias </b>ActeTable <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreMedicationAdm<span style="color: navy">&quot; </span><b>alias </b>MedicationAdmTable <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreMedicationPre<span style="color: navy">&quot; </span><b>alias </b>MedicationPreTable <b>as </b><b>target</b>

<b>group </b>init<span style="color: navy">(</span><b>source</b> <span style="color: maroon">srcQR</span><span style="color: navy"> : </span>QR, <b>target</b> <span style="color: maroon">tgtDS</span><span style="color: navy"> : </span>DataSet<span style="color: navy">)</span><b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  srcQR<span style="color: navy"><b> -&gt; </b></span>tgtDS.logicalId = <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span> <i>&quot;setId&quot;</i><span style="color: navy">;</span>
  srcQR<span style="color: navy"><b> -&gt; </b></span> tgtDS.patient<b> as </b><span style="color: maroon">tgtPatient</span><span style="color: navy">, </span> tgtDS.sejour<b> as </b><span style="color: maroon">tgtSejour</span><span style="color: navy">, </span> tgtDS.biology<b> as </b><span style="color: maroon">tgtBiol</span><span style="color: navy">, </span> tgtDS.clinical<b> as </b><span style="color: maroon">tgtClin</span><span style="color: navy">, </span> tgtDS.medicationPre<b> as </b><span style="color: maroon">tgtMedPre</span><span style="color: navy">, </span> tgtDS.medicationAdm<b> as </b><span style="color: maroon">tgtMedAdm</span><b> then</b><span style="color: navy"> {
</span>    srcQR.subject<b> as </b><span style="color: maroon">srcSubject</span><b> then</b><span style="color: navy"> {
</span>      srcSubject.identifier<b> as </b><span style="color: maroon">srcSubjectIdentifier</span><b> where </b>system = 'https://dpi.exemple/Patient/PatientNi'<b> then</b><span style="color: navy"> {
</span>        srcSubjectIdentifier.value<b> as </b><span style="color: maroon">srcSubjectId</span><b> then</b><span style="color: navy"> {
</span>          srcQR.item<b> as </b><span style="color: maroon">srcSocioDemoDataItem</span><b> where </b>linkId = '4647259356106'<b> then</b><span style="color: navy"> {
</span>            srcSocioDemoDataItem<span style="color: navy"><b> -&gt; </b></span>tgtDS.patient = <b>create</b><span style="color: navy">(</span><span style="color: blue">'PatientTable'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">newPatient</span><b> then </b>Patient<span style="color: navy">(</span><span style="color: maroon">srcSubjectId</span><span style="color: navy">, </span><span style="color: maroon">srcSocioDemoDataItem</span><span style="color: navy">, </span><span style="color: maroon">newPatient</span><span style="color: navy">)</span> <i>&quot;setPatient&quot;</i><span style="color: navy">;</span>
            srcSocioDemoDataItem.item<b> as </b><span style="color: maroon">srcEnvItem</span><b> where </b>linkId = '5491974639955'<span style="color: navy"><b> -&gt; </b></span>tgtDS.address = <b>create</b><span style="color: navy">(</span><span style="color: blue">'AddressTable'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">newAddress</span><b> then </b>Environement<span style="color: navy">(</span><span style="color: maroon">srcSubjectId</span><span style="color: navy">, </span><span style="color: maroon">srcEnvItem</span><span style="color: navy">, </span><span style="color: maroon">newAddress</span><span style="color: navy">)</span> <i>&quot;setEnvironnement&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;navigationToSocioDemoData&quot;</i><span style="color: navy">;</span>
          srcQR.item<b> as </b><span style="color: maroon">srcPMSIDataItem</span><b> where </b>linkId = '2825244231605'<b> then</b><span style="color: navy"> {
</span>            srcPMSIDataItem.item<b> as </b><span style="color: maroon">srcPMSISexeItem</span><b> where </b>linkId = '3894630481120'<b> then</b><span style="color: navy"> {
</span>              srcPMSISexeItem.answer<b> as </b><span style="color: maroon">srcPMSISexeAnswer</span><b> then</b><span style="color: navy"> {
</span>                srcPMSISexeAnswer.value<span style="color: navy"> : </span>Coding<b> as </b><span style="color: maroon">srcPMSISexeValueCoding</span><span style="color: navy"><b> -&gt; </b></span>tgtPatient.gender = <span style="color: navy">(</span>%srcPMSISexeValueCoding.code<span style="color: navy">)</span> <i>&quot;SetPMSISexeValue&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;SetPMSISexeAnswer&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;setPMSISexe&quot;</i><span style="color: navy">;</span>
            srcPMSIDataItem.item<b> as </b><span style="color: maroon">srcPMSIDiagItem</span><b> where </b>linkId = '9391816419630'<span style="color: navy"><b> -&gt; </b></span>tgtDS.diag = <b>create</b><span style="color: navy">(</span><span style="color: blue">'DiagTable'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">newDiag</span><b> then </b>PMSIDiag<span style="color: navy">(</span><span style="color: maroon">srcSubjectId</span><span style="color: navy">, </span><span style="color: maroon">srcPMSIDiagItem</span><span style="color: navy">, </span><span style="color: maroon">newDiag</span><span style="color: navy">)</span> <i>&quot;navigationToPMSIDiag&quot;</i><span style="color: navy">;</span>
            srcPMSIDataItem.item<b> as </b><span style="color: maroon">srcPMSIActeItem</span><b> where </b>linkId = '591926901726'<span style="color: navy"><b> -&gt; </b></span>tgtDS.acte = <b>create</b><span style="color: navy">(</span><span style="color: blue">'ActeTable'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">newActe</span><b> then </b>PMSIActe<span style="color: navy">(</span><span style="color: maroon">srcSubjectId</span><span style="color: navy">, </span><span style="color: maroon">srcPMSIActeItem</span><span style="color: navy">, </span><span style="color: maroon">newActe</span><span style="color: navy">)</span> <i>&quot;navigationToPMSIDiag&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;navigationToPMSIData&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;setIdentifierValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;selectPatientIdentifier&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setPatientId&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;setTgtVar&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>Patient<span style="color: navy">(</span><b>source</b> <span style="color: maroon">srcSubjectId</span>, <b>source</b> <span style="color: maroon">srcSocioDemoDataItem</span>, <b>target</b> <span style="color: maroon">newPatient</span><span style="color: navy"> : </span>PatientTable<span style="color: navy">)</span><span style="color: navy"> {
</span>  srcSocioDemoDataItem.item<b> as </b><span style="color: maroon">srcPatientIdItem</span><b> where </b>linkId = '2958000860428'<b> then</b><span style="color: navy"> {
</span>    srcPatientIdItem.item<b> as </b><span style="color: maroon">srcNomItem</span><b> where </b>linkId = '8605698058770'<b> then</b><span style="color: navy"> {
</span>      srcNomItem.answer<b> as </b><span style="color: maroon">srcNomAnswer</span><b> then</b><span style="color: navy"> {
</span>        srcNomAnswer.value<span style="color: navy"> : </span>string<b> as </b><span style="color: maroon">srcNomValue</span><span style="color: navy"><b> -&gt; </b></span>newPatient.name = <span style="color: maroon">srcNomValue</span> <i>&quot;SetNomValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setNomAnswer&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setNom&quot;</i><span style="color: navy">;</span>
    srcPatientIdItem.item<b> as </b><span style="color: maroon">srcPrenomItem</span><b> where </b>linkId = '6214879623503'<b> then</b><span style="color: navy"> {
</span>      srcPrenomItem.answer<b> as </b><span style="color: maroon">srcPrenomAnswer</span><b> then</b><span style="color: navy"> {
</span>        srcPrenomAnswer.value<span style="color: navy"> : </span>string<b> as </b><span style="color: maroon">srcPrenomValue</span><span style="color: navy"><b> -&gt; </b></span>newPatient.firstName = <span style="color: maroon">srcPrenomValue</span> <i>&quot;SetPrenomValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setPrenomAnswer&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setPrenom&quot;</i><span style="color: navy">;</span>
    srcPatientIdItem.item<b> as </b><span style="color: maroon">srcNIRItem</span><b> where </b>linkId = '5711960356160'<b> then</b><span style="color: navy"> {
</span>      srcNIRItem.answer<b> as </b><span style="color: maroon">srcNIRAnswer</span><b> then</b><span style="color: navy"> {
</span>        srcNIRAnswer.value<span style="color: navy"> : </span>string<b> as </b><span style="color: maroon">srcNIRValue</span><span style="color: navy"><b> -&gt; </b></span>newPatient.nir = <span style="color: maroon">srcNIRValue</span> <i>&quot;SetNIRValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setNIRAnswer&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setNIR&quot;</i><span style="color: navy">;</span>
    srcPatientIdItem.item<b> as </b><span style="color: maroon">srcDDNItem</span><b> where </b>linkId = '5036133558154'<b> then</b><span style="color: navy"> {
</span>      srcDDNItem.answer<b> as </b><span style="color: maroon">srcDDNAnswer</span><b> then</b><span style="color: navy"> {
</span>        srcDDNAnswer.value<span style="color: navy"> : </span>date<b> as </b><span style="color: maroon">srcDDNValue</span><span style="color: navy"><b> -&gt; </b></span>newPatient.birthDate = <span style="color: maroon">srcDDNValue</span> <i>&quot;SetDDNValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setDDNAnswer&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setDDN&quot;</i><span style="color: navy">;</span>
    srcPatientIdItem.item<b> as </b><span style="color: maroon">srcDDDItem</span><b> where </b>linkId = '5036133558154'<b> then</b><span style="color: navy"> {
</span>      srcDDDItem.answer<b> as </b><span style="color: maroon">srcDDDAnswer</span><b> then</b><span style="color: navy"> {
</span>        srcDDDAnswer.value<span style="color: navy"> : </span>date<b> as </b><span style="color: maroon">srcDDDValue</span> <i>&quot;SetDDDValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setDDDAnswer&quot;</i><span style="color: navy">;</span>
      srcDDDItem.item<b> as </b><span style="color: maroon">srcDDDSourceItem</span><b> where </b>linkId = '9098810065693'<b> then</b><span style="color: navy"> {
</span>        srcDDDSourceItem.answer<b> as </b><span style="color: maroon">srcDDDSourceAnswer</span><b> then</b><span style="color: navy"> {
</span>          srcDDDSourceAnswer.value<span style="color: navy"> : </span>Coding<b> as </b><span style="color: maroon">srcDDDSourceValue</span> <i>&quot;SetDDDSourceValue&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;setDDDSourceAnswer&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setDDDSource&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setDDD&quot;</i><span style="color: navy">;</span>
    srcPatientIdItem.item<b> as </b><span style="color: maroon">srcGemRankItem</span><b> where </b>linkId = '6931296968515'<b> then</b><span style="color: navy"> {
</span>      srcGemRankItem.answer<b> as </b><span style="color: maroon">srcGemRankAnswer</span><b> then</b><span style="color: navy"> {
</span>        srcGemRankAnswer.value<span style="color: navy"> : </span>integer<b> as </b><span style="color: maroon">srcGemRankValue</span> <i>&quot;SetGemRankValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;SetGemRankAnswer&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;SetGemRank&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;navigationToPatientId&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>Environement<span style="color: navy">(</span><b>source</b> <span style="color: maroon">srcSubjectId</span>, <b>source</b> <span style="color: maroon">srcEnvItem</span>, <b>target</b> <span style="color: maroon">newAddress</span><span style="color: navy"> : </span>AddressTable<span style="color: navy">)</span><span style="color: navy"> {
</span>  srcEnvItem.item<b> as </b><span style="color: maroon">srcGeocodItem</span><b> where </b>linkId = '3816475533472'<span style="color: navy"><b> -&gt; </b></span>newAddress.patientNi<b> as </b><span style="color: maroon">newAddressPatient</span><b> then</b><span style="color: navy"> {
</span>    srcGeocodItem<span style="color: navy"><b> -&gt; </b></span>newAddressPatient.reference = <span style="color: navy">(</span>'PatientCore/' + %srcSubjectId.toString()<span style="color: navy">)</span> <i>&quot;setAddressPatientRef&quot;</i><span style="color: navy">;</span>
    srcGeocodItem.item<b> as </b><span style="color: maroon">srcLatItem</span><b> where </b>linkId = '3709843054556'<b> then</b><span style="color: navy"> {
</span>      srcLatItem.answer<b> as </b><span style="color: maroon">srcLatAnswer</span><b> then</b><span style="color: navy"> {
</span>        srcLatAnswer.value<span style="color: navy"> : </span>decimal<b> as </b><span style="color: maroon">srcLatValue</span><span style="color: navy"><b> -&gt; </b></span>newAddress.latitude = <span style="color: maroon">srcLatValue</span> <i>&quot;SetLatValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setLatAnswer&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setLat&quot;</i><span style="color: navy">;</span>
    srcGeocodItem.item<b> as </b><span style="color: maroon">srcLongItem</span><b> where </b>linkId = '7651448032665'<b> then</b><span style="color: navy"> {
</span>      srcLongItem.answer<b> as </b><span style="color: maroon">srcLongAnswer</span><b> then</b><span style="color: navy"> {
</span>        srcLongAnswer.value<span style="color: navy"> : </span>decimal<b> as </b><span style="color: maroon">srcLongValue</span><span style="color: navy"><b> -&gt; </b></span>newAddress.longitude = <span style="color: maroon">srcLongValue</span> <i>&quot;SetLongValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setLongAnswer&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setLong&quot;</i><span style="color: navy">;</span>
    srcGeocodItem.item<b> as </b><span style="color: maroon">srcGeocodDateItem</span><b> where </b>linkId = '1185653257776'<b> then</b><span style="color: navy"> {
</span>      srcGeocodDateItem.answer<b> as </b><span style="color: maroon">srcGeocodDateAnswer</span><b> then</b><span style="color: navy"> {
</span>        srcGeocodDateAnswer.value<span style="color: navy"> : </span>date<b> as </b><span style="color: maroon">srcGeocodDateValue</span> <i>&quot;SetGeocodDateValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setGeocodDateAnswer&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setGeocodDate&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;navigationToGeocod&quot;</i><span style="color: navy">;</span>
  srcEnvItem.item<b> as </b><span style="color: maroon">srcIrisItem</span><b> where </b>linkId = '7621032273792'<b> then</b><span style="color: navy"> {
</span>    srcIrisItem.answer<b> as </b><span style="color: maroon">srcIrisAnswer</span><b> then</b><span style="color: navy"> {
</span>      srcIrisAnswer.value<span style="color: navy"> : </span>Coding<b> as </b><span style="color: maroon">srcIrisValue</span> <i>&quot;SetIrisValue&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setIrisAnswer&quot;</i><span style="color: navy">;</span>
    srcIrisItem.item<b> as </b><span style="color: maroon">srcIrisDateItem</span><b> where </b>linkId = '4999580038872'<b> then</b><span style="color: navy"> {
</span>      srcIrisDateItem.answer<b> as </b><span style="color: maroon">srcIrisDateAnswer</span><b> then</b><span style="color: navy"> {
</span>        srcIrisDateAnswer.value<span style="color: navy"> : </span>date<b> as </b><span style="color: maroon">srcIrisDateValue</span> <i>&quot;SetIrisDateValue&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;setIrisDateAnswer&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;setIrisDate&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;setIris&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>PMSIDiag<span style="color: navy">(</span><b>source</b> <span style="color: maroon">srcSubjectId</span>, <b>source</b> <span style="color: maroon">srcPMSIDiagItem</span>, <b>target</b> <span style="color: maroon">newDiag</span><span style="color: navy"> : </span>DiagTable<span style="color: navy">)</span><span style="color: navy"> {
</span>  srcPMSIDiagItem<span style="color: navy"><b> -&gt; </b></span>newDiag.patientNi<b> as </b><span style="color: maroon">newDiagPatient</span><b> then</b><span style="color: navy"> {
</span>    srcPMSIDiagItem<span style="color: navy"><b> -&gt; </b></span>newDiagPatient.reference = <span style="color: navy">(</span>'PatientCore/' + %srcSubjectId.toString()<span style="color: navy">)</span> <i>&quot;setDiagPatientRef&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;setDiagPatient&quot;</i><span style="color: navy">;</span>
  srcPMSIDiagItem.item<b> as </b><span style="color: maroon">srcPMSIDiagDateItem</span><b> where </b>linkId = '7114466839467'<b> then</b><span style="color: navy"> {
</span>    srcPMSIDiagDateItem.answer<b> as </b><span style="color: maroon">srcPMSIDiagDateAnswer</span><b> then</b><span style="color: navy"> {
</span>      srcPMSIDiagDateAnswer.value<span style="color: navy"> : </span>date<b> as </b><span style="color: maroon">srcPMSIDiagDateValue</span> <i>&quot;SetPMSIDiagDateValue&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;SetPMSIDiagDateAnswer&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;SetPMSIDiagDate&quot;</i><span style="color: navy">;</span>
  srcPMSIDiagItem.item<b> as </b><span style="color: maroon">srcPMSIDiagTypeItem</span><b> where </b>linkId = '6427586743735'<b> then</b><span style="color: navy"> {
</span>    srcPMSIDiagTypeItem.answer<b> as </b><span style="color: maroon">srcPMSIDiagTypeAnswer</span><b> then</b><span style="color: navy"> {
</span>      srcPMSIDiagTypeAnswer.value<span style="color: navy"> : </span>Coding<b> as </b><span style="color: maroon">srcPMSIDiagTypeValueCoding</span><span style="color: navy"><b> -&gt; </b></span>newDiag.codeType = <span style="color: navy">(</span>%srcPMSIDiagTypeValueCoding.display<span style="color: navy">)</span> <i>&quot;SetPMSIDiagTypeValue&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;SetPMSIDiagTypeAnswer&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;SetPMSIDiagType&quot;</i><span style="color: navy">;</span>
  srcPMSIDiagItem.item<b> as </b><span style="color: maroon">srcPMSIDiagCodeItem</span><b> where </b>linkId = '5505101189372'<b> then</b><span style="color: navy"> {
</span>    srcPMSIDiagCodeItem.answer<b> as </b><span style="color: maroon">srcPMSIDiagCodeAnswer</span><b> then</b><span style="color: navy"> {
</span>      srcPMSIDiagCodeAnswer.value<span style="color: navy"> : </span>Coding<b> as </b><span style="color: maroon">srcPMSIDiagCodeValueCoding</span><span style="color: navy"><b> -&gt; </b></span>newDiag.code = <span style="color: navy">(</span>%srcPMSIDiagCodeValueCoding.code<span style="color: navy">)</span> <i>&quot;SetPMSIDiagCodeValue&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;SetPMSIDiagCodeAnswer&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;SetPMSIDiagCode&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>PMSIActe<span style="color: navy">(</span><b>source</b> <span style="color: maroon">srcSubjectId</span>, <b>source</b> <span style="color: maroon">srcPMSIActeItem</span>, <b>target</b> <span style="color: maroon">newActe</span><span style="color: navy"> : </span>ActeTable<span style="color: navy">)</span><span style="color: navy"> {
</span>  srcPMSIActeItem<span style="color: navy"><b> -&gt; </b></span>newActe.patientNi<b> as </b><span style="color: maroon">newActePatient</span><b> then</b><span style="color: navy"> {
</span>    srcPMSIActeItem<span style="color: navy"><b> -&gt; </b></span>newActePatient.reference = <span style="color: navy">(</span>'PatientCore/' + %srcSubjectId.toString()<span style="color: navy">)</span> <i>&quot;setActePatientRef&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;setActePatient&quot;</i><span style="color: navy">;</span>
  srcPMSIActeItem.item<b> as </b><span style="color: maroon">srcPMSIActeDateRecItem</span><b> where </b>linkId = '9436509453137'<b> then</b><span style="color: navy"> {
</span>    srcPMSIActeDateRecItem.answer<b> as </b><span style="color: maroon">srcPMSIActeDateRecAnswer</span><b> then</b><span style="color: navy"> {
</span>      srcPMSIActeDateRecAnswer.value<span style="color: navy"> : </span>date<b> as </b><span style="color: maroon">srcPMSIActeDateRecValue</span> <i>&quot;SetPMSIActeDateRecValue&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;SetPMSIActeDateRecAnswer&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;SetPMSIActeDateRec&quot;</i><span style="color: navy">;</span>
  srcPMSIActeItem.item<b> as </b><span style="color: maroon">srcPMSIActeDateItem</span><b> where </b>linkId = '5066866286682'<b> then</b><span style="color: navy"> {
</span>    srcPMSIActeDateItem.answer<b> as </b><span style="color: maroon">srcPMSIActeDateAnswer</span><b> then</b><span style="color: navy"> {
</span>      srcPMSIActeDateAnswer.value<span style="color: navy"> : </span>dateTime<b> as </b><span style="color: maroon">srcPMSIActeDateValue</span><span style="color: navy"><b> -&gt; </b></span> newActe.dateStart = <span style="color: maroon">srcPMSIActeDateValue</span><span style="color: navy">, </span> newActe.dateEnd = <span style="color: maroon">srcPMSIActeDateValue</span> <i>&quot;SetPMSIActeDateValue&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;SetPMSIActeDateAnswer&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;SetPMSIActeDate&quot;</i><span style="color: navy">;</span>
  srcPMSIActeItem.item<b> as </b><span style="color: maroon">srcPMSIActeCodeItem</span><b> where </b>linkId = '7758110033600'<b> then</b><span style="color: navy"> {
</span>    srcPMSIActeCodeItem.answer<b> as </b><span style="color: maroon">srcPMSIActeCodeAnswer</span><b> then</b><span style="color: navy"> {
</span>      srcPMSIActeCodeAnswer.value<span style="color: navy"> : </span>Coding<b> as </b><span style="color: maroon">srcPMSIActeCodeValueCoding</span><span style="color: navy"><b> -&gt; </b></span>newActe.code = <span style="color: navy">(</span>%srcPMSIActeCodeValueCoding.code<span style="color: navy">)</span> <i>&quot;SetPMSIActeCodeValue&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;SetPMSIActeCodeAnswer&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;SetPMSIActeCode&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url
       value="https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreBusiness2Physical"/>
  <version value="0.1.0"/>
  <name value="CoreBusiness2Physical"/>
  <title
         value="Alignement de l''expression de besoin vers le modèle physique du DPI dans le cadre de l''usage Core"/>
  <status value="draft"/>
  <date value="2025-10-23T20:49:03+00:00"/>
  <publisher value="AP-HP"/>
  <contact>
    <name value="AP-HP"/>
    <telecom>
      <system value="url"/>
      <value value="https://aphp.fr"/>
    </telecom>
  </contact>
  <description
               value="Alignement de l''expression de besoin vers le modèle physique du DPI dans le cadre de l''usage Core"/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="FR"/>
      <display value="France"/>
    </coding>
  </jurisdiction>
  <structure>
    <url
         value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
    <mode value="source"/>
    <alias value="QR"/>
  </structure>
  <structure>
    <url
         value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreDataSet"/>
    <mode value="target"/>
    <alias value="DataSet"/>
  </structure>
  <structure>
    <url
         value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CorePatient"/>
    <mode value="target"/>
    <alias value="PatientTable"/>
  </structure>
  <structure>
    <url
         value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreAddress"/>
    <mode value="target"/>
    <alias value="AddressTable"/>
  </structure>
  <structure>
    <url
         value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreSejour"/>
    <mode value="target"/>
    <alias value="SejourTable"/>
  </structure>
  <structure>
    <url
         value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreBiology"/>
    <mode value="target"/>
    <alias value="BiologyTable"/>
  </structure>
  <structure>
    <url
         value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreClinical"/>
    <mode value="target"/>
    <alias value="ClinicalTable"/>
  </structure>
  <structure>
    <url
         value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreDiag"/>
    <mode value="target"/>
    <alias value="DiagTable"/>
  </structure>
  <structure>
    <url
         value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreActe"/>
    <mode value="target"/>
    <alias value="ActeTable"/>
  </structure>
  <structure>
    <url
         value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreMedicationAdm"/>
    <mode value="target"/>
    <alias value="MedicationAdmTable"/>
  </structure>
  <structure>
    <url
         value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreMedicationPre"/>
    <mode value="target"/>
    <alias value="MedicationPreTable"/>
  </structure>
  <group>
    <name value="init"/>
    <typeMode value="types"/>
    <input>
      <name value="srcQR"/>
      <type value="QR"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgtDS"/>
      <type value="DataSet"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="setId"/>
      <source>
        <context value="srcQR"/>
      </source>
      <target>
        <context value="tgtDS"/>
        <contextType value="variable"/>
        <element value="logicalId"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="setTgtVar"/>
      <source>
        <context value="srcQR"/>
      </source>
      <target>
        <context value="tgtDS"/>
        <contextType value="variable"/>
        <element value="patient"/>
        <variable value="tgtPatient"/>
      </target>
      <target>
        <context value="tgtDS"/>
        <contextType value="variable"/>
        <element value="sejour"/>
        <variable value="tgtSejour"/>
      </target>
      <target>
        <context value="tgtDS"/>
        <contextType value="variable"/>
        <element value="biology"/>
        <variable value="tgtBiol"/>
      </target>
      <target>
        <context value="tgtDS"/>
        <contextType value="variable"/>
        <element value="clinical"/>
        <variable value="tgtClin"/>
      </target>
      <target>
        <context value="tgtDS"/>
        <contextType value="variable"/>
        <element value="medicationPre"/>
        <variable value="tgtMedPre"/>
      </target>
      <target>
        <context value="tgtDS"/>
        <contextType value="variable"/>
        <element value="medicationAdm"/>
        <variable value="tgtMedAdm"/>
      </target>
      <rule>
        <name value="setPatientId"/>
        <source>
          <context value="srcQR"/>
          <element value="subject"/>
          <variable value="srcSubject"/>
        </source>
        <rule>
          <name value="selectPatientIdentifier"/>
          <source>
            <context value="srcSubject"/>
            <element value="identifier"/>
            <variable value="srcSubjectIdentifier"/>
            <condition
                       value="system = 'https://dpi.exemple/Patient/PatientNi'"/>
          </source>
          <rule>
            <name value="setIdentifierValue"/>
            <source>
              <context value="srcSubjectIdentifier"/>
              <element value="value"/>
              <variable value="srcSubjectId"/>
            </source>
            <rule>
              <name value="navigationToSocioDemoData"/>
              <source>
                <context value="srcQR"/>
                <element value="item"/>
                <variable value="srcSocioDemoDataItem"/>
                <condition value="linkId = '4647259356106'"/>
              </source>
              <rule>
                <name value="setPatient"/>
                <source>
                  <context value="srcSocioDemoDataItem"/>
                </source>
                <target>
                  <context value="tgtDS"/>
                  <contextType value="variable"/>
                  <element value="patient"/>
                  <variable value="newPatient"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="PatientTable"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="Patient"/>
                  <variable value="srcSubjectId"/>
                  <variable value="srcSocioDemoDataItem"/>
                  <variable value="newPatient"/>
                </dependent>
              </rule>
              <rule>
                <name value="setEnvironnement"/>
                <source>
                  <context value="srcSocioDemoDataItem"/>
                  <element value="item"/>
                  <variable value="srcEnvItem"/>
                  <condition value="linkId = '5491974639955'"/>
                </source>
                <target>
                  <context value="tgtDS"/>
                  <contextType value="variable"/>
                  <element value="address"/>
                  <variable value="newAddress"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="AddressTable"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="Environement"/>
                  <variable value="srcSubjectId"/>
                  <variable value="srcEnvItem"/>
                  <variable value="newAddress"/>
                </dependent>
              </rule>
            </rule>
            <rule>
              <name value="navigationToPMSIData"/>
              <source>
                <context value="srcQR"/>
                <element value="item"/>
                <variable value="srcPMSIDataItem"/>
                <condition value="linkId = '2825244231605'"/>
              </source>
              <rule>
                <name value="setPMSISexe"/>
                <source>
                  <context value="srcPMSIDataItem"/>
                  <element value="item"/>
                  <variable value="srcPMSISexeItem"/>
                  <condition value="linkId = '3894630481120'"/>
                </source>
                <rule>
                  <name value="SetPMSISexeAnswer"/>
                  <source>
                    <context value="srcPMSISexeItem"/>
                    <element value="answer"/>
                    <variable value="srcPMSISexeAnswer"/>
                  </source>
                  <rule>
                    <name value="SetPMSISexeValue"/>
                    <source>
                      <context value="srcPMSISexeAnswer"/>
                      <type value="Coding"/>
                      <element value="value"/>
                      <variable value="srcPMSISexeValueCoding"/>
                    </source>
                    <target>
                      <context value="tgtPatient"/>
                      <contextType value="variable"/>
                      <element value="gender"/>
                      <transform value="evaluate"/>
                      <parameter>
                        <valueString value="%srcPMSISexeValueCoding.code"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
              <rule>
                <name value="navigationToPMSIDiag"/>
                <source>
                  <context value="srcPMSIDataItem"/>
                  <element value="item"/>
                  <variable value="srcPMSIDiagItem"/>
                  <condition value="linkId = '9391816419630'"/>
                </source>
                <target>
                  <context value="tgtDS"/>
                  <contextType value="variable"/>
                  <element value="diag"/>
                  <variable value="newDiag"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="DiagTable"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="PMSIDiag"/>
                  <variable value="srcSubjectId"/>
                  <variable value="srcPMSIDiagItem"/>
                  <variable value="newDiag"/>
                </dependent>
              </rule>
              <rule>
                <name value="navigationToPMSIDiag"/>
                <source>
                  <context value="srcPMSIDataItem"/>
                  <element value="item"/>
                  <variable value="srcPMSIActeItem"/>
                  <condition value="linkId = '591926901726'"/>
                </source>
                <target>
                  <context value="tgtDS"/>
                  <contextType value="variable"/>
                  <element value="acte"/>
                  <variable value="newActe"/>
                  <transform value="create"/>
                  <parameter>
                    <valueString value="ActeTable"/>
                  </parameter>
                </target>
                <dependent>
                  <name value="PMSIActe"/>
                  <variable value="srcSubjectId"/>
                  <variable value="srcPMSIActeItem"/>
                  <variable value="newActe"/>
                </dependent>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="Patient"/>
    <typeMode value="none"/>
    <input>
      <name value="srcSubjectId"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="srcSocioDemoDataItem"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="newPatient"/>
      <type value="PatientTable"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="navigationToPatientId"/>
      <source>
        <context value="srcSocioDemoDataItem"/>
        <element value="item"/>
        <variable value="srcPatientIdItem"/>
        <condition value="linkId = '2958000860428'"/>
      </source>
      <rule>
        <name value="setNom"/>
        <source>
          <context value="srcPatientIdItem"/>
          <element value="item"/>
          <variable value="srcNomItem"/>
          <condition value="linkId = '8605698058770'"/>
        </source>
        <rule>
          <name value="setNomAnswer"/>
          <source>
            <context value="srcNomItem"/>
            <element value="answer"/>
            <variable value="srcNomAnswer"/>
          </source>
          <rule>
            <name value="SetNomValue"/>
            <source>
              <context value="srcNomAnswer"/>
              <type value="string"/>
              <element value="value"/>
              <variable value="srcNomValue"/>
            </source>
            <target>
              <context value="newPatient"/>
              <contextType value="variable"/>
              <element value="name"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="srcNomValue"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="setPrenom"/>
        <source>
          <context value="srcPatientIdItem"/>
          <element value="item"/>
          <variable value="srcPrenomItem"/>
          <condition value="linkId = '6214879623503'"/>
        </source>
        <rule>
          <name value="setPrenomAnswer"/>
          <source>
            <context value="srcPrenomItem"/>
            <element value="answer"/>
            <variable value="srcPrenomAnswer"/>
          </source>
          <rule>
            <name value="SetPrenomValue"/>
            <source>
              <context value="srcPrenomAnswer"/>
              <type value="string"/>
              <element value="value"/>
              <variable value="srcPrenomValue"/>
            </source>
            <target>
              <context value="newPatient"/>
              <contextType value="variable"/>
              <element value="firstName"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="srcPrenomValue"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="setNIR"/>
        <source>
          <context value="srcPatientIdItem"/>
          <element value="item"/>
          <variable value="srcNIRItem"/>
          <condition value="linkId = '5711960356160'"/>
        </source>
        <rule>
          <name value="setNIRAnswer"/>
          <source>
            <context value="srcNIRItem"/>
            <element value="answer"/>
            <variable value="srcNIRAnswer"/>
          </source>
          <rule>
            <name value="SetNIRValue"/>
            <source>
              <context value="srcNIRAnswer"/>
              <type value="string"/>
              <element value="value"/>
              <variable value="srcNIRValue"/>
            </source>
            <target>
              <context value="newPatient"/>
              <contextType value="variable"/>
              <element value="nir"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="srcNIRValue"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="setDDN"/>
        <source>
          <context value="srcPatientIdItem"/>
          <element value="item"/>
          <variable value="srcDDNItem"/>
          <condition value="linkId = '5036133558154'"/>
        </source>
        <rule>
          <name value="setDDNAnswer"/>
          <source>
            <context value="srcDDNItem"/>
            <element value="answer"/>
            <variable value="srcDDNAnswer"/>
          </source>
          <rule>
            <name value="SetDDNValue"/>
            <source>
              <context value="srcDDNAnswer"/>
              <type value="date"/>
              <element value="value"/>
              <variable value="srcDDNValue"/>
            </source>
            <target>
              <context value="newPatient"/>
              <contextType value="variable"/>
              <element value="birthDate"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="srcDDNValue"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="setDDD"/>
        <source>
          <context value="srcPatientIdItem"/>
          <element value="item"/>
          <variable value="srcDDDItem"/>
          <condition value="linkId = '5036133558154'"/>
        </source>
        <rule>
          <name value="setDDDAnswer"/>
          <source>
            <context value="srcDDDItem"/>
            <element value="answer"/>
            <variable value="srcDDDAnswer"/>
          </source>
          <rule>
            <name value="SetDDDValue"/>
            <source>
              <context value="srcDDDAnswer"/>
              <type value="date"/>
              <element value="value"/>
              <variable value="srcDDDValue"/>
            </source>
          </rule>
        </rule>
        <rule>
          <name value="setDDDSource"/>
          <source>
            <context value="srcDDDItem"/>
            <element value="item"/>
            <variable value="srcDDDSourceItem"/>
            <condition value="linkId = '9098810065693'"/>
          </source>
          <rule>
            <name value="setDDDSourceAnswer"/>
            <source>
              <context value="srcDDDSourceItem"/>
              <element value="answer"/>
              <variable value="srcDDDSourceAnswer"/>
            </source>
            <rule>
              <name value="SetDDDSourceValue"/>
              <source>
                <context value="srcDDDSourceAnswer"/>
                <type value="Coding"/>
                <element value="value"/>
                <variable value="srcDDDSourceValue"/>
              </source>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="SetGemRank"/>
        <source>
          <context value="srcPatientIdItem"/>
          <element value="item"/>
          <variable value="srcGemRankItem"/>
          <condition value="linkId = '6931296968515'"/>
        </source>
        <rule>
          <name value="SetGemRankAnswer"/>
          <source>
            <context value="srcGemRankItem"/>
            <element value="answer"/>
            <variable value="srcGemRankAnswer"/>
          </source>
          <rule>
            <name value="SetGemRankValue"/>
            <source>
              <context value="srcGemRankAnswer"/>
              <type value="integer"/>
              <element value="value"/>
              <variable value="srcGemRankValue"/>
            </source>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="Environement"/>
    <typeMode value="none"/>
    <input>
      <name value="srcSubjectId"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="srcEnvItem"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="newAddress"/>
      <type value="AddressTable"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="navigationToGeocod"/>
      <source>
        <context value="srcEnvItem"/>
        <element value="item"/>
        <variable value="srcGeocodItem"/>
        <condition value="linkId = '3816475533472'"/>
      </source>
      <target>
        <context value="newAddress"/>
        <contextType value="variable"/>
        <element value="patientNi"/>
        <variable value="newAddressPatient"/>
      </target>
      <rule>
        <name value="setAddressPatientRef"/>
        <source>
          <context value="srcGeocodItem"/>
        </source>
        <target>
          <context value="newAddressPatient"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString value="'PatientCore/' + %srcSubjectId.toString()"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="setLat"/>
        <source>
          <context value="srcGeocodItem"/>
          <element value="item"/>
          <variable value="srcLatItem"/>
          <condition value="linkId = '3709843054556'"/>
        </source>
        <rule>
          <name value="setLatAnswer"/>
          <source>
            <context value="srcLatItem"/>
            <element value="answer"/>
            <variable value="srcLatAnswer"/>
          </source>
          <rule>
            <name value="SetLatValue"/>
            <source>
              <context value="srcLatAnswer"/>
              <type value="decimal"/>
              <element value="value"/>
              <variable value="srcLatValue"/>
            </source>
            <target>
              <context value="newAddress"/>
              <contextType value="variable"/>
              <element value="latitude"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="srcLatValue"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="setLong"/>
        <source>
          <context value="srcGeocodItem"/>
          <element value="item"/>
          <variable value="srcLongItem"/>
          <condition value="linkId = '7651448032665'"/>
        </source>
        <rule>
          <name value="setLongAnswer"/>
          <source>
            <context value="srcLongItem"/>
            <element value="answer"/>
            <variable value="srcLongAnswer"/>
          </source>
          <rule>
            <name value="SetLongValue"/>
            <source>
              <context value="srcLongAnswer"/>
              <type value="decimal"/>
              <element value="value"/>
              <variable value="srcLongValue"/>
            </source>
            <target>
              <context value="newAddress"/>
              <contextType value="variable"/>
              <element value="longitude"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="srcLongValue"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="setGeocodDate"/>
        <source>
          <context value="srcGeocodItem"/>
          <element value="item"/>
          <variable value="srcGeocodDateItem"/>
          <condition value="linkId = '1185653257776'"/>
        </source>
        <rule>
          <name value="setGeocodDateAnswer"/>
          <source>
            <context value="srcGeocodDateItem"/>
            <element value="answer"/>
            <variable value="srcGeocodDateAnswer"/>
          </source>
          <rule>
            <name value="SetGeocodDateValue"/>
            <source>
              <context value="srcGeocodDateAnswer"/>
              <type value="date"/>
              <element value="value"/>
              <variable value="srcGeocodDateValue"/>
            </source>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="setIris"/>
      <source>
        <context value="srcEnvItem"/>
        <element value="item"/>
        <variable value="srcIrisItem"/>
        <condition value="linkId = '7621032273792'"/>
      </source>
      <rule>
        <name value="setIrisAnswer"/>
        <source>
          <context value="srcIrisItem"/>
          <element value="answer"/>
          <variable value="srcIrisAnswer"/>
        </source>
        <rule>
          <name value="SetIrisValue"/>
          <source>
            <context value="srcIrisAnswer"/>
            <type value="Coding"/>
            <element value="value"/>
            <variable value="srcIrisValue"/>
          </source>
        </rule>
      </rule>
      <rule>
        <name value="setIrisDate"/>
        <source>
          <context value="srcIrisItem"/>
          <element value="item"/>
          <variable value="srcIrisDateItem"/>
          <condition value="linkId = '4999580038872'"/>
        </source>
        <rule>
          <name value="setIrisDateAnswer"/>
          <source>
            <context value="srcIrisDateItem"/>
            <element value="answer"/>
            <variable value="srcIrisDateAnswer"/>
          </source>
          <rule>
            <name value="SetIrisDateValue"/>
            <source>
              <context value="srcIrisDateAnswer"/>
              <type value="date"/>
              <element value="value"/>
              <variable value="srcIrisDateValue"/>
            </source>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="PMSIDiag"/>
    <typeMode value="none"/>
    <input>
      <name value="srcSubjectId"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="srcPMSIDiagItem"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="newDiag"/>
      <type value="DiagTable"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="setDiagPatient"/>
      <source>
        <context value="srcPMSIDiagItem"/>
      </source>
      <target>
        <context value="newDiag"/>
        <contextType value="variable"/>
        <element value="patientNi"/>
        <variable value="newDiagPatient"/>
      </target>
      <rule>
        <name value="setDiagPatientRef"/>
        <source>
          <context value="srcPMSIDiagItem"/>
        </source>
        <target>
          <context value="newDiagPatient"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString value="'PatientCore/' + %srcSubjectId.toString()"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="SetPMSIDiagDate"/>
      <source>
        <context value="srcPMSIDiagItem"/>
        <element value="item"/>
        <variable value="srcPMSIDiagDateItem"/>
        <condition value="linkId = '7114466839467'"/>
      </source>
      <rule>
        <name value="SetPMSIDiagDateAnswer"/>
        <source>
          <context value="srcPMSIDiagDateItem"/>
          <element value="answer"/>
          <variable value="srcPMSIDiagDateAnswer"/>
        </source>
        <rule>
          <name value="SetPMSIDiagDateValue"/>
          <source>
            <context value="srcPMSIDiagDateAnswer"/>
            <type value="date"/>
            <element value="value"/>
            <variable value="srcPMSIDiagDateValue"/>
          </source>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="SetPMSIDiagType"/>
      <source>
        <context value="srcPMSIDiagItem"/>
        <element value="item"/>
        <variable value="srcPMSIDiagTypeItem"/>
        <condition value="linkId = '6427586743735'"/>
      </source>
      <rule>
        <name value="SetPMSIDiagTypeAnswer"/>
        <source>
          <context value="srcPMSIDiagTypeItem"/>
          <element value="answer"/>
          <variable value="srcPMSIDiagTypeAnswer"/>
        </source>
        <rule>
          <name value="SetPMSIDiagTypeValue"/>
          <source>
            <context value="srcPMSIDiagTypeAnswer"/>
            <type value="Coding"/>
            <element value="value"/>
            <variable value="srcPMSIDiagTypeValueCoding"/>
          </source>
          <target>
            <context value="newDiag"/>
            <contextType value="variable"/>
            <element value="codeType"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString value="%srcPMSIDiagTypeValueCoding.display"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="SetPMSIDiagCode"/>
      <source>
        <context value="srcPMSIDiagItem"/>
        <element value="item"/>
        <variable value="srcPMSIDiagCodeItem"/>
        <condition value="linkId = '5505101189372'"/>
      </source>
      <rule>
        <name value="SetPMSIDiagCodeAnswer"/>
        <source>
          <context value="srcPMSIDiagCodeItem"/>
          <element value="answer"/>
          <variable value="srcPMSIDiagCodeAnswer"/>
        </source>
        <rule>
          <name value="SetPMSIDiagCodeValue"/>
          <source>
            <context value="srcPMSIDiagCodeAnswer"/>
            <type value="Coding"/>
            <element value="value"/>
            <variable value="srcPMSIDiagCodeValueCoding"/>
          </source>
          <target>
            <context value="newDiag"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString value="%srcPMSIDiagCodeValueCoding.code"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="PMSIActe"/>
    <typeMode value="none"/>
    <input>
      <name value="srcSubjectId"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="srcPMSIActeItem"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="newActe"/>
      <type value="ActeTable"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="setActePatient"/>
      <source>
        <context value="srcPMSIActeItem"/>
      </source>
      <target>
        <context value="newActe"/>
        <contextType value="variable"/>
        <element value="patientNi"/>
        <variable value="newActePatient"/>
      </target>
      <rule>
        <name value="setActePatientRef"/>
        <source>
          <context value="srcPMSIActeItem"/>
        </source>
        <target>
          <context value="newActePatient"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString value="'PatientCore/' + %srcSubjectId.toString()"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="SetPMSIActeDateRec"/>
      <source>
        <context value="srcPMSIActeItem"/>
        <element value="item"/>
        <variable value="srcPMSIActeDateRecItem"/>
        <condition value="linkId = '9436509453137'"/>
      </source>
      <rule>
        <name value="SetPMSIActeDateRecAnswer"/>
        <source>
          <context value="srcPMSIActeDateRecItem"/>
          <element value="answer"/>
          <variable value="srcPMSIActeDateRecAnswer"/>
        </source>
        <rule>
          <name value="SetPMSIActeDateRecValue"/>
          <source>
            <context value="srcPMSIActeDateRecAnswer"/>
            <type value="date"/>
            <element value="value"/>
            <variable value="srcPMSIActeDateRecValue"/>
          </source>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="SetPMSIActeDate"/>
      <source>
        <context value="srcPMSIActeItem"/>
        <element value="item"/>
        <variable value="srcPMSIActeDateItem"/>
        <condition value="linkId = '5066866286682'"/>
      </source>
      <rule>
        <name value="SetPMSIActeDateAnswer"/>
        <source>
          <context value="srcPMSIActeDateItem"/>
          <element value="answer"/>
          <variable value="srcPMSIActeDateAnswer"/>
        </source>
        <rule>
          <name value="SetPMSIActeDateValue"/>
          <source>
            <context value="srcPMSIActeDateAnswer"/>
            <type value="dateTime"/>
            <element value="value"/>
            <variable value="srcPMSIActeDateValue"/>
          </source>
          <target>
            <context value="newActe"/>
            <contextType value="variable"/>
            <element value="dateStart"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="srcPMSIActeDateValue"/>
            </parameter>
          </target>
          <target>
            <context value="newActe"/>
            <contextType value="variable"/>
            <element value="dateEnd"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="srcPMSIActeDateValue"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="SetPMSIActeCode"/>
      <source>
        <context value="srcPMSIActeItem"/>
        <element value="item"/>
        <variable value="srcPMSIActeCodeItem"/>
        <condition value="linkId = '7758110033600'"/>
      </source>
      <rule>
        <name value="SetPMSIActeCodeAnswer"/>
        <source>
          <context value="srcPMSIActeCodeItem"/>
          <element value="answer"/>
          <variable value="srcPMSIActeCodeAnswer"/>
        </source>
        <rule>
          <name value="SetPMSIActeCodeValue"/>
          <source>
            <context value="srcPMSIActeCodeAnswer"/>
            <type value="Coding"/>
            <element value="value"/>
            <variable value="srcPMSIActeCodeValueCoding"/>
          </source>
          <target>
            <context value="newActe"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString value="%srcPMSIActeCodeValueCoding.code"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
</StructureMap>