Comments (4)
Try to take the value in the same call -> does not change the output
quantity.unit as unit then {
quantity.value as value -> medDispQuantity.value = value "value";
unit -> medDispQuantity.unit = unit "unit";
unit -> medDispQuantity.system = 'http://unitsofmeasure.org' "ucum";
unit -> medDispQuantity.code = unit "code";
} "unit";
from cda-fhir-maps.
Correct Mapping from the Data Type quantity for the element Medication.amount
(numerator and denominator are from Data Type quantity)
<amount>
<numerator>
<value value="100"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</numerator>
<denominator>
<value value="1"/>
<unit value="Package"/>
<system value="http://unitsofmeasure.org"/>
<code value="1"/>
</denominator>
</amount>
Mapping for this case:
(Map: input\maps\CdaChEmedMedicationDispenseDocumentToBundle.map)
capacityQuantity where $this.unit.exists() then {
capacityQuantity.unit as unit then {
capacityQuantity.value as value -> ratio.numerator = create('Quantity') as quantity,
quantity.value = value,
quantity.unit = unit,
quantity.system = 'http://unitsofmeasure.org',
quantity.code = unit,
ratio.denominator = create('Quantity') as denominator
,
denominator.value = '1',
denominator.unit = 'Package',
denominator.system = 'http://unitsofmeasure.org',
denominator.code = '1'
"capacityQuantity";
} "capQuantUnit";
} "unit";
from cda-fhir-maps.
<quantity>
<value value="20"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</quantity>
with the current Dispense map the quantity works:
src.quantity as quantity -> medicationDispense.quantity as medDispQuantity then {
// IHE-DIS: If the product-element contains package information, the unit attribute is not be present
quantity.value as value -> medDispQuantity.value = value "value";
// IHE-DIS: If the product-element does not contain package information, the unit attribut is present and the value SHALL be out of the UCUM code system
quantity.unit as unit then {
unit -> medDispQuantity.unit = unit "unit";
unit -> medDispQuantity.system = 'http://unitsofmeasure.org' "ucum";
unit -> medDispQuantity.code = unit "code";
} "unit";
} "quantity";
@ziegm can you confirm and close?
from cda-fhir-maps.
checked, it works correctly
from cda-fhir-maps.
Related Issues (20)
- assignedAuthor has address / telecom not populated
- Mapping MedStat/MedReq.note vs. Dosage.text (unstructured)
- CH-EMED-PMP mapping additions
- CH-EMED-PMP: Referenz auf Narrative
- CH-EMED-PMP: invalid text.reference in AnnotationComment HOT 1
- pharm:asContent only when amount and code
- CH-EMED-PMP: Mapping if author = device
- CH-EMED-PMP: Unstructured dosage - start and end date on dosage
- CH-EMED-PMP: medication in reserve
- Improve mapping for MedicationStatement.note HOT 1
- Mapping document author if device to wrong resource type HOT 1
- Missing author on entry level HOT 1
- Missing mapping for different authors (on different levels) HOT 1
- Adjust mapping for PADV documents
- add mapping (cda->fhir) for externalDocumentId and id in the Medication List elements
- templateId missing fhir -> cda
- Practitioner.address/name are not mapped (CDA -> FHIR) HOT 1
- mapping ext (ch-emed-ext-dispense) HOT 2
- list CDA -> FHIR: Composition section missing HOT 3
- empty narrative HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cda-fhir-maps.