Details
-
Change Request
-
Resolution: Persuasive
-
Medium
-
Structured Data Capture (SDC) (FHIR)
-
3.0.0
-
FHIR Infrastructure
-
Populatable Questionnaire - StructureMap
-
-
Brian Postlethwaite/Paul Lynch: 3-0-0
-
Correction
-
Non-substantive
Description
The file https://github.com/HL7/sdc/blob/master/input/images-source/questionnaire-population-transform.map is then processed to produce this output, however there are a few minor issues with it that I've corrected
http://hl7.org/fhir/uv/sdc/StructureMap-questionnaire-population-transform.html
1. Cast the fhirpath expression outputs to the correct types to go into the quesitonnaireresponse, including creating a coding from the code value.
to put a url or id value into a string it should be cast using toString()
2. Use the join fhirpath function rather than aggregate which is not really fhirpath compliant to perform that action as the initial value is not defined in this way (and is arguably a bug in HAPI that makes it work at all)
givenNameAnswer.value = (patientResEntry.resource.name.first().given.aggregate(iif($total.empty(), $this, $total & " " & $this))) "givenNameValue";
givenName.answer as givenNameAnswer, givenNameAnswer.value = (patientResEntry.resource.name.first().given.join(', ')) "givenNameValue";
and
medsCategoryAnswer.value = (medResource.category.coding.where(system='http://terminology.hl7.org/CodeSystem/medicationrequest-category').code.aggregate(iif($total.empty(), $this, $total & " " & $this))) "medsCategoryAnswer";
medsCategoryAnswer.value = (medResource.category.coding.where(system='http://terminology.hl7.org/CodeSystem/medicationrequest-category').code.join(' ')) "medsCategoryAnswer";
Also, would like the raw mapping language file to be included in the HTML output too as another format.