Stream: genomics
Topic: Validation issue for RelatedArtifact
Fei Yan (Dec 05 2019 at 18:32):
Hi,
I am validating below resource on HAPI FHIR JPA server:
{
"resourceType": "Observation",
"id": "16012",
"meta": {
"versionId": "1",
"lastUpdated": "2019-12-03T10:07:06.000-06:00",
"profile": [
"http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/medication-metabolism"
]
},
...
...
"component": [
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/RelatedArtifact",
"valueRelatedArtifact": {
"type": "justification",
"url": "..."
}
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "...",
"display": "..."
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://ncimeta.nci.nih.gov",
"code": "...",
"display": "..."
}
]
}
}
]
}
I got below error:
{
"severity": "error",
"code": "processing",
"diagnostics": "Problem with use of resolve() - profile '[CanonicalType[http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/RelatedArtifact]]' on Observation.extension:RelatedArtifact could not be resolved",
"location": [
"Parameters.parameter[0].resource.extension[0]"
]
}
Any help will be appreciated. Thanks in advance.
Fei
Jamie Jones (Dec 05 2019 at 19:30):
Hi Fei,
It looks like you are attempting to attach a relatedArtifact as an extension on Observation.component. RelatedArtifact using its current structure definition is defined as an extension in the context of base Observations and DiagnosticReports, not within components. I would first try moving the relatedArtifiact out of the component and confirm you do not see the error.
Observation in particular can have multiple relatedArtifact extensions at the top level, and it is an open topic for this group to determine how best to link them to applicable components. It has been suggested by @Lloyd McKenzie to add internal reference ids to the components and refer to them from the relatedArtifact, but I do not see our current extension being able to support this computationally
Jamie Jones (Dec 05 2019 at 19:31):
As I see it with the extension we provided, you could mention the internal id of the component in relatedArtifact.label, which is "A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index."
Fei Yan (Dec 05 2019 at 19:58):
@Jamie Jones Thanks for your quick response!
Lloyd McKenzie (Dec 05 2019 at 23:52):
I think you could do it like this: [base]/Observation/57#123
where 57 is the Observation and 123 is the id on the component you're referring to. @Grahame Grieve, is that a legal thing to do in a Reference?
Grahame Grieve (Dec 05 2019 at 23:59):
yes
Grahame Grieve (Dec 05 2019 at 23:59):
oh no hangon
Grahame Grieve (Dec 06 2019 at 00:00):
only to contained resources
Grahame Grieve (Dec 06 2019 at 00:00):
no, where is it from? If it's a Reference(X) then you can't since the target isn't an X
Lloyd McKenzie (Dec 06 2019 at 03:22):
Then I guess we'd need an extension on the extension to indicate the specific component.
Why are we wanting to point to a component?
Kevin Power (Dec 06 2019 at 14:30):
I think this is what triggered it: https://chat.fhir.org/#narrow/stream/189875-genomics-.2F.20eMerge.20Pilot/topic/relatedArtifact.20extension.20change.20request
Kevin Power (Dec 06 2019 at 14:31):
And on a call, I think you made the suggestion to not add RA to Observation.component[] but rather keep RA on Observation and do something to reference
Lloyd McKenzie (Dec 06 2019 at 17:27):
Ok, as I look at the original use-case, I'm wondering if the problem is that we're using Component inappropriately. If we want to say "no significant impact for this variant and med", the statement should be with respect to a single med, not to a whole collection of them. If you evaluate 50 medications, that should actually be 50 Observations because it's actually 50 distinct statements. If you determine that one of the assessments was in error, that shouldn't affect the others. And if you do things that way, there's no need to point to a component. (In reality you wouldn't be pointing to the component anyhow, you'd be pointing to the overall statement, but wanting to filter to the sub-assertion relevant to that medication.)
Kevin Power (Dec 06 2019 at 18:47):
Thanks @Lloyd McKenzie -- Would you mind posting your thoughts on the referenced thread since we have moved beyond just this particular validation issue.
Last updated: Apr 12 2022 at 19:14 UTC