Narratif généré : StructureMap StructureMap-QuestionnaireResponse-JSON #xD; map "https://www.ghdc.be/StructureMap/StructureMap-QuestionnaireResponse-JSON" = "TransformeQuestionnaireResponseJSONEnQuestionnaireRepsonseFHIRSDC"#xD; #xD; // StructureMap permettant la transformation d'une extraction JSON de QuestionnaireResponse vers le standard FHIR SDC QuestionnaireResponse.#xD; #xD; uses "https://www.ghdc.be" alias source as source#xD; uses "http://hl7.org/fhir/StructureDefinition/Questionnaire" alias source as source#xD; uses "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse" alias target as target#xD; #xD; group main(source source : JSON, source questionnaire : Questionnaire, target target : QuestionnaireResponse) {#xD; source.reponses : JSON as reponses then {#xD; reponses.groupId : json as groupId then {#xD; target.item as groupItem where $this.linkId=%groupId then {#xD; reponses.questions : json as question then {#xD; question.questionId : json as questionId then {#xD; groupItem.item as questionItem where $this.linkId=%questionId then {#xD; questionnaire.item as questionnaireGroupItem where $this.linkId=%groupId then {#xD; questionnaireGroupItem.item as questionnaireQuestionItem where $this.linkId=%questionId then {#xD; questionnaireQuestionItem.type as questionType then {#xD; question.reponse : json as reponse then {#xD; questionType as questionType where ($this = 'choice').not() and %reponse.exists() -> questionItem.answer[0].value = cast(reponse, questionType) "CastNoChoice";#xD; questionType as questionType where $this = 'choice' and %reponse.exists() -> questionItem.answer[0].value = c('http://loinc.org', reponse) "CastChoice";#xD; } "FetchResponse";#xD; } "FetchQuestionType";#xD; } "FindQuestionnaireQuestion";#xD; } "FindQuestionnaireGroup";#xD; } "FindQuestion";#xD; } "QuestionId";#xD; } "Questions";#xD; } "FindGroup";#xD; };#xD; };#xD; }#xD; #xD;
Transforme une extraction JSON QuestionnaireResponse vers un FHIR SDC QuestionnaireResponse
StructureMap permettant la transformation d'une extraction JSON de QuestionnaireResponse vers le standard FHIR SDC QuestionnaireResponse.
($this = 'choice').not() and %reponse.exists()