Data Management with FHIR 0.1.0 - ci-build

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

## StructureMap: Alignement de l''expression de besoin vers le modèle physique du DPI dans le cadre de l''usage Core

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

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

    map "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreBusiness2Physical" = "CoreBusiness2Physical"

    // Alignement de l''expression de besoin vers le modèle physique du DPI dans le cadre de l''usage Core

    uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QR as source
    uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreDataSet" alias DataSet as target
    uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CorePatient" alias PatientTable as target
    uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreAddress" alias AddressTable as target
    uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreSejour" alias SejourTable as target
    uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreBiology" alias BiologyTable as target
    uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreClinical" alias ClinicalTable as target
    uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreDiag" alias DiagTable as target
    uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreActe" alias ActeTable as target
    uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreMedicationAdm" alias MedicationAdmTable as target
    uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreMedicationPre" alias MedicationPreTable as target

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

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

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

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

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