Narratif généré : StructureMap CoreBusiness2Physical #xD; map "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreBusiness2Physical" = "CoreBusiness2Physical"#xD; #xD; // Alignement de l''expression de besoin vers le modèle physique du DPI dans le cadre de l''usage Core#xD; #xD; uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QR as source#xD; uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreDataSet" alias DataSet as target#xD; uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CorePatient" alias PatientTable as target#xD; uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreAddress" alias AddressTable as target#xD; uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreSejour" alias SejourTable as target#xD; uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreBiology" alias BiologyTable as target#xD; uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreClinical" alias ClinicalTable as target#xD; uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreDiag" alias DiagTable as target#xD; uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreActe" alias ActeTable as target#xD; uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreMedicationAdm" alias MedicationAdmTable as target#xD; uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/CoreMedicationPre" alias MedicationPreTable as target#xD; #xD; group init(source srcQR : QR, target tgtDS : DataSet) <<types>> {#xD; srcQR -> tgtDS.logicalId = uuid() "setId";#xD; 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 {#xD; srcQR.subject as srcSubject then {#xD; srcSubject.identifier as srcSubjectIdentifier where system = 'https://dpi.exemple/Patient/PatientNi' then {#xD; srcSubjectIdentifier.value as srcSubjectId then {#xD; srcQR.item as srcSocioDemoDataItem where linkId = '4647259356106' then {#xD; srcSocioDemoDataItem -> tgtDS.patient = create('PatientTable') as newPatient then Patient(srcSubjectId, srcSocioDemoDataItem, newPatient) "setPatient";#xD; srcSocioDemoDataItem.item as srcEnvItem where linkId = '5491974639955' -> tgtDS.address = create('AddressTable') as newAddress then Environement(srcSubjectId, srcEnvItem, newAddress) "setEnvironnement";#xD; } "navigationToSocioDemoData";#xD; srcQR.item as srcPMSIDataItem where linkId = '2825244231605' then {#xD; srcPMSIDataItem.item as srcPMSISexeItem where linkId = '3894630481120' then {#xD; srcPMSISexeItem.answer as srcPMSISexeAnswer then {#xD; srcPMSISexeAnswer.value : Coding as srcPMSISexeValueCoding -> tgtPatient.gender = (%srcPMSISexeValueCoding.code) "SetPMSISexeValue";#xD; } "SetPMSISexeAnswer";#xD; } "setPMSISexe";#xD; srcPMSIDataItem.item as srcPMSIDiagItem where linkId = '9391816419630' -> tgtDS.diag = create('DiagTable') as newDiag then PMSIDiag(srcSubjectId, srcPMSIDiagItem, newDiag) "navigationToPMSIDiag";#xD; srcPMSIDataItem.item as srcPMSIActeItem where linkId = '591926901726' -> tgtDS.acte = create('ActeTable') as newActe then PMSIActe(srcSubjectId, srcPMSIActeItem, newActe) "navigationToPMSIDiag";#xD; } "navigationToPMSIData";#xD; } "setIdentifierValue";#xD; } "selectPatientIdentifier";#xD; } "setPatientId";#xD; } "setTgtVar";#xD; }#xD; #xD; group Patient(source srcSubjectId, source srcSocioDemoDataItem, target newPatient : PatientTable) {#xD; srcSocioDemoDataItem.item as srcPatientIdItem where linkId = '2958000860428' then {#xD; srcPatientIdItem.item as srcNomItem where linkId = '8605698058770' then {#xD; srcNomItem.answer as srcNomAnswer then {#xD; srcNomAnswer.value : string as srcNomValue -> newPatient.name = srcNomValue "SetNomValue";#xD; } "setNomAnswer";#xD; } "setNom";#xD; srcPatientIdItem.item as srcPrenomItem where linkId = '6214879623503' then {#xD; srcPrenomItem.answer as srcPrenomAnswer then {#xD; srcPrenomAnswer.value : string as srcPrenomValue -> newPatient.firstName = srcPrenomValue "SetPrenomValue";#xD; } "setPrenomAnswer";#xD; } "setPrenom";#xD; srcPatientIdItem.item as srcNIRItem where linkId = '5711960356160' then {#xD; srcNIRItem.answer as srcNIRAnswer then {#xD; srcNIRAnswer.value : string as srcNIRValue -> newPatient.nir = srcNIRValue "SetNIRValue";#xD; } "setNIRAnswer";#xD; } "setNIR";#xD; srcPatientIdItem.item as srcDDNItem where linkId = '5036133558154' then {#xD; srcDDNItem.answer as srcDDNAnswer then {#xD; srcDDNAnswer.value : date as srcDDNValue -> newPatient.birthDate = srcDDNValue "SetDDNValue";#xD; } "setDDNAnswer";#xD; } "setDDN";#xD; srcPatientIdItem.item as srcDDDItem where linkId = '5036133558154' then {#xD; srcDDDItem.answer as srcDDDAnswer then {#xD; srcDDDAnswer.value : date as srcDDDValue "SetDDDValue";#xD; } "setDDDAnswer";#xD; srcDDDItem.item as srcDDDSourceItem where linkId = '9098810065693' then {#xD; srcDDDSourceItem.answer as srcDDDSourceAnswer then {#xD; srcDDDSourceAnswer.value : Coding as srcDDDSourceValue "SetDDDSourceValue";#xD; } "setDDDSourceAnswer";#xD; } "setDDDSource";#xD; } "setDDD";#xD; srcPatientIdItem.item as srcGemRankItem where linkId = '6931296968515' then {#xD; srcGemRankItem.answer as srcGemRankAnswer then {#xD; srcGemRankAnswer.value : integer as srcGemRankValue "SetGemRankValue";#xD; } "SetGemRankAnswer";#xD; } "SetGemRank";#xD; } "navigationToPatientId";#xD; }#xD; #xD; group Environement(source srcSubjectId, source srcEnvItem, target newAddress : AddressTable) {#xD; srcEnvItem.item as srcGeocodItem where linkId = '3816475533472' -> newAddress.patientNi as newAddressPatient then {#xD; srcGeocodItem -> newAddressPatient.reference = ('PatientCore/' + %srcSubjectId.toString()) "setAddressPatientRef";#xD; srcGeocodItem.item as srcLatItem where linkId = '3709843054556' then {#xD; srcLatItem.answer as srcLatAnswer then {#xD; srcLatAnswer.value : decimal as srcLatValue -> newAddress.latitude = srcLatValue "SetLatValue";#xD; } "setLatAnswer";#xD; } "setLat";#xD; srcGeocodItem.item as srcLongItem where linkId = '7651448032665' then {#xD; srcLongItem.answer as srcLongAnswer then {#xD; srcLongAnswer.value : decimal as srcLongValue -> newAddress.longitude = srcLongValue "SetLongValue";#xD; } "setLongAnswer";#xD; } "setLong";#xD; srcGeocodItem.item as srcGeocodDateItem where linkId = '1185653257776' then {#xD; srcGeocodDateItem.answer as srcGeocodDateAnswer then {#xD; srcGeocodDateAnswer.value : date as srcGeocodDateValue "SetGeocodDateValue";#xD; } "setGeocodDateAnswer";#xD; } "setGeocodDate";#xD; } "navigationToGeocod";#xD; srcEnvItem.item as srcIrisItem where linkId = '7621032273792' then {#xD; srcIrisItem.answer as srcIrisAnswer then {#xD; srcIrisAnswer.value : Coding as srcIrisValue "SetIrisValue";#xD; } "setIrisAnswer";#xD; srcIrisItem.item as srcIrisDateItem where linkId = '4999580038872' then {#xD; srcIrisDateItem.answer as srcIrisDateAnswer then {#xD; srcIrisDateAnswer.value : date as srcIrisDateValue "SetIrisDateValue";#xD; } "setIrisDateAnswer";#xD; } "setIrisDate";#xD; } "setIris";#xD; }#xD; #xD; group PMSIDiag(source srcSubjectId, source srcPMSIDiagItem, target newDiag : DiagTable) {#xD; srcPMSIDiagItem -> newDiag.patientNi as newDiagPatient then {#xD; srcPMSIDiagItem -> newDiagPatient.reference = ('PatientCore/' + %srcSubjectId.toString()) "setDiagPatientRef";#xD; } "setDiagPatient";#xD; srcPMSIDiagItem.item as srcPMSIDiagDateItem where linkId = '7114466839467' then {#xD; srcPMSIDiagDateItem.answer as srcPMSIDiagDateAnswer then {#xD; srcPMSIDiagDateAnswer.value : date as srcPMSIDiagDateValue "SetPMSIDiagDateValue";#xD; } "SetPMSIDiagDateAnswer";#xD; } "SetPMSIDiagDate";#xD; srcPMSIDiagItem.item as srcPMSIDiagTypeItem where linkId = '6427586743735' then {#xD; srcPMSIDiagTypeItem.answer as srcPMSIDiagTypeAnswer then {#xD; srcPMSIDiagTypeAnswer.value : Coding as srcPMSIDiagTypeValueCoding -> newDiag.codeType = (%srcPMSIDiagTypeValueCoding.display) "SetPMSIDiagTypeValue";#xD; } "SetPMSIDiagTypeAnswer";#xD; } "SetPMSIDiagType";#xD; srcPMSIDiagItem.item as srcPMSIDiagCodeItem where linkId = '5505101189372' then {#xD; srcPMSIDiagCodeItem.answer as srcPMSIDiagCodeAnswer then {#xD; srcPMSIDiagCodeAnswer.value : Coding as srcPMSIDiagCodeValueCoding -> newDiag.code = (%srcPMSIDiagCodeValueCoding.code) "SetPMSIDiagCodeValue";#xD; } "SetPMSIDiagCodeAnswer";#xD; } "SetPMSIDiagCode";#xD; }#xD; #xD; group PMSIActe(source srcSubjectId, source srcPMSIActeItem, target newActe : ActeTable) {#xD; srcPMSIActeItem -> newActe.patientNi as newActePatient then {#xD; srcPMSIActeItem -> newActePatient.reference = ('PatientCore/' + %srcSubjectId.toString()) "setActePatientRef";#xD; } "setActePatient";#xD; srcPMSIActeItem.item as srcPMSIActeDateRecItem where linkId = '9436509453137' then {#xD; srcPMSIActeDateRecItem.answer as srcPMSIActeDateRecAnswer then {#xD; srcPMSIActeDateRecAnswer.value : date as srcPMSIActeDateRecValue "SetPMSIActeDateRecValue";#xD; } "SetPMSIActeDateRecAnswer";#xD; } "SetPMSIActeDateRec";#xD; srcPMSIActeItem.item as srcPMSIActeDateItem where linkId = '5066866286682' then {#xD; srcPMSIActeDateItem.answer as srcPMSIActeDateAnswer then {#xD; srcPMSIActeDateAnswer.value : dateTime as srcPMSIActeDateValue -> newActe.dateStart = srcPMSIActeDateValue, newActe.dateEnd = srcPMSIActeDateValue "SetPMSIActeDateValue";#xD; } "SetPMSIActeDateAnswer";#xD; } "SetPMSIActeDate";#xD; srcPMSIActeItem.item as srcPMSIActeCodeItem where linkId = '7758110033600' then {#xD; srcPMSIActeCodeItem.answer as srcPMSIActeCodeAnswer then {#xD; srcPMSIActeCodeAnswer.value : Coding as srcPMSIActeCodeValueCoding -> newActe.code = (%srcPMSIActeCodeValueCoding.code) "SetPMSIActeCodeValue";#xD; } "SetPMSIActeCodeAnswer";#xD; } "SetPMSIActeCode";#xD; }#xD; #xD;
Alignement de l''expression de besoin vers le modèle physique du DPI dans le cadre de l''usage Core
system = 'https://dpi.exemple/Patient/PatientNi'
'PatientCore/' + %srcSubjectId.toString()