Stream: conformance
Topic: Slicing on an optional element
Josh Mandel (Apr 24 2019 at 18:51):
@Mark Kramer Looking through http://standardhealthrecord.org/guides/mcode/index.html -- super cool! Quick question on profiles... I clicked around to:
http://standardhealthrecord.org/guides/mcode/StructureDefinition-shr-core-BodyHeight.json
and found:
{
"id": "Observation.code.coding-Fixed-8302-2.code",
"path": "Observation.code.coding.code",
"name": "Observation.code.coding-Fixed-8302-2.code",
"short": "Symbol in syntax defined by the system",
"definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
"requirements": "Need to refer to a particular code in the system.",
"min": 0,
"max": "1",
"type": [
{
"code": "code"
}
],
"fixedCode": "8302-2",
which seems to say that the code is fixed but the element is optional. Is this intentional? (I'm not sure how to interpret it, and by comparison http://build.fhir.org/bodyheight.profile.json makes the equivalent element required:
{
"id" : "Observation.code.coding:BodyHeightCode.code",
"path" : "Observation.code.coding.code",
"short" : "Symbol in syntax defined by the system",
"definition" : "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
"requirements" : "Need to refer to a particular code in the system.",
"min" : 1,
"max" : "1",
"base" : {
"path" : "Coding.code",
"min" : 0,
"max" : "1"
},
"type" : [{
"code" : "code"
}],
"fixedCode" : "8302-2",
Josh Mandel (Apr 24 2019 at 18:54):
For this matter, I'm also wondering whether the ids should use colons instead of dashes, like Observation.code.coding:Fixed-8302-2.code instead of Observation.code.coding-Fixed-8302-2.code?
Josh Mandel (Apr 29 2019 at 20:20):
For now I've submitted a bug to CIMPL (https://github.com/standardhealth/shr-cli/issues/199).
Chris Moesel (Apr 30 2019 at 01:07):
Hi @Josh Mandel -- as for the card being 0..1 instead of 1..1 -- I agree. That appears to be a bug in the tooling. I thought that we set the card to 1..1 whenever we fixed something on the element, but obviously that's not the case.
Chris Moesel (Apr 30 2019 at 01:13):
As for the id, I'd love to use : instead of -, but I ran into a little-known and even-littler-discussed secret of DSTU2: technically : (and even [ and ]) are not allowed in DSTU2 ids. It's spelled out in the DSTU2 spec here: http://hl7.org/fhir/DSTU2/datatypes.html#id
Chris Moesel (Apr 30 2019 at 01:15):
There's some unresolved conversation about it here and here.
Last updated: Apr 12 2022 at 19:14 UTC