Stream: IG creation
Topic: Using the Age datatype
Notification Bot (Feb 21 2022 at 05:35):
Richard Townley-O'Neill has marked this topic as unresolved.
Richard Townley-O'Neill (Feb 21 2022 at 05:40):
Quantity.type.profile = "http://hl7.org/fhir/StructureDefinition/Age" does not work. :sad:
It gives
Profile http://hl7.org/fhir/StructureDefinition/Age is for type StructureDefinition[http://hl7.org/fhir/StructureDefinition/Age], but the Observation.value[x] element has type Quantity
Jose Costa Teixeira (Feb 21 2022 at 06:44):
Right. I just read that Age is a specialization of Quantity, not a profile
Chris Moesel (Feb 21 2022 at 14:09):
Yeah. I think you have two choices:
- replicate the Age constraints on value[x] (type constraint to Quantity, duplicate age-1 invariant w/ modified paths, and extensible VS binding to AllUCUMExpressionForTime)
- define a FHIRPath constraint on value[x] that says
$this.conformsTo('http://hl7.org/fhir/StructureDefinition/Age')
Richard Townley-O'Neill (Feb 21 2022 at 22:34):
Thanks @Chris Moesel . I had not thought of a FHIRPath constraint using conforms to.
Richard Townley-O'Neill (Feb 21 2022 at 22:37):
I've decided to replicate the relevant bits from Age. As I'm making value, system and code 1..1 I can simplify the constraint.
Grahame Grieve (Feb 21 2022 at 22:58):
I'm not sure that conformsTo is meant to be used that way. I'm not sure I've ever tested it, but a quantity can't conform to Age, because the definitions says that it's a type not a profile
Chris Moesel (Feb 22 2022 at 02:02):
Ah. I hadn't noticed that conformsTo
is specific to profiles. The function signature just says structure
-- but you're right, the body says it should be a profile. My bad. Thanks for the correction!
Last updated: Apr 12 2022 at 19:14 UTC