molecularlife
12/03/2025, 6:26 PMmolecularlife
12/03/2025, 6:30 PMnathan-watkins-unityai
12/04/2025, 5:00 PMSimpleQuantity is technically a profile of Quantity, not its own datatype. If you search for "Range.low" or "Range.high" in [dataelements.json](https://raw.githubusercontent.com/medplum/medplum/refs/heads/main/packages/definitions/src/fhir/r4/dataelements.json), you can see the profile applied there, so Medplum appears to handle it correctly. MoneyQuantity is a similar special case.
The SimpleQuantity vs Quantity medplum docs you linked do distinguish that comparator is not allowed in SimpleQuantity
TL;DR: I think the implementation looks correct; Range docs could potentially point to SimpleQuantity in the Type column, like R4 does in those special cases
"type" : "Range.low",
"baseDefinition" : "http://hl7.org/fhir/StructureDefinition/Element",
"derivation" : "specialization",
"snapshot" : {
"element" : [{
"id" : "Range.low",
"path" : "Range.low",
"short" : "Low limit",
"definition" : "The low limit. The boundary is inclusive.",
"comment" : "If the low element is missing, the low boundary is not known.",
"min" : 0,
"max" : "1",
"base" : {
"path" : "Range.low",
"min" : 0,
"max" : "1"
},
"type" : [{
"code" : "Quantity",
"profile" : ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]
}],
"isModifier" : false,
"isSummary" : true,
"mapping" : [{
"identity" : "v2",
"map" : "NR.1"
},
{
"identity" : "rim",
"map" : "./low"
}]
}]
}