HL7 / us-breastcancer

Breast Cancer Data
0 stars 1 forks source link

Unexpected slicing on component.valueQuantity #11

Closed cmoesel closed 6 years ago

cmoesel commented 6 years ago

Some components are showing up w/ weird slicing and a valueCount. Needs investigation.

image

http://build.fhir.org/ig/HL7/us-breastcancer/StructureDefinition-shr-oncology-BreastPathologicalLymphNodeInvolvement.html

cmoesel commented 6 years ago

I looked into this and the problem is that the CIMPL value is an IntegerQuantity and that IntegerQuantity is mapped to Count -- but Count is not one of the valid choices for value[x].

Even though Count is a specialization of Quantity, and Quantity is a valid choice for value[x], it is still not legal to use valueCount (see zulip thread).

Will need further investigation to determine right way forward. It may be that we need to change mapping of IntegerQuantity to normal Quantity -- especially since IntegerQuantity can be negative and Count can't.

cmoesel commented 6 years ago

I've fixed this by providing better support for dealing with "specialized" types applied to choices (specifically when the choice only contains the type being specialized, not the specialization itself).

I'm still not sure IntegerQuantity should be mapped to Count, but that's a different question.

cmoesel commented 6 years ago

Fixed in latest beta tooling and on build.hl7.org.