Map Target Provenance Extension¶
| Canonical | https://fhir.apps.health/StructureDefinition/nexus-map-target-provenance |
|---|---|
| Status | draft · 1.33.0 |
| Base | Extension (constraint) |
| Context | ConceptMap.group.element.target (element) |
| Source | FSH · JSON |
Where a ConceptMap target came from and how confident its source is in it: provenance names the
source, and confidence is that source's confidence, a decimal from 0 to 1.
FSH
The authored source of truth: extensions/MapTargetProvenanceExtension.fsh (edit on GitHub). One FSH file may define several related artifacts.
// MapTargetProvenanceExtension.fsh
// Where a ConceptMap target came from, and how confident its source is: a code for the source
// (`provenance`) and a decimal from 0 to 1 (`confidence`). Emitted on the targets of the ICD-9-CM to
// OHIP diagnostic code map and the routes built on it, where one ICD-9 code can have targets from
// different sources and a consumer ranking them needs to know which is which.
//
// COMPLEX, NOT TWO EXTENSIONS: the two facts are one statement ("this source, at this confidence"),
// and a confidence without its source cannot be compared across targets.
//
// PROVENANCE IS EXTENSIBLE. Two sources exist today; a curator added later is a new code in
// nexus-map-target-provenance-kind, not a new extension.
Alias: $NexusMapTargetProvenance = https://fhir.apps.health/StructureDefinition/nexus-map-target-provenance
Invariant: nexus-mtp-1
Description: "confidence SHALL be between 0 and 1 inclusive"
Severity: #error
Expression: "extension('confidence').value.ofType(decimal).all($this >= 0 and $this <= 1)"
Extension: NexusMapTargetProvenance
Id: nexus-map-target-provenance
Title: "Map Target Provenance"
Description: """
Where a `ConceptMap` target came from and how confident its source is in it: `provenance` names the
source, and `confidence` is that source's confidence, a decimal from 0 to 1.
**Confidence is comparable across sources, by construction.** A machine classifier states its own
probability that the target belongs to the source code's related family. A rule-based source states
a fixed confidence no higher than the lowest a classifier target can carry, so sorting targets by
`confidence` never ranks a rule-based target above a classifier one. Confidence is stated to two
decimals and rounded down, never up.
**It is not the relationship.** `target.equivalence` still says how the target relates to the source
code; this says who proposed it and how sure they are. A confident target can still be `relatedto`.
**The same facts may also lead `target.comment`**, as `[<provenance> p=<confidence>]` (for example
`[jev p=0.93]`). Where both are present they agree; this extension is the structured form, and a
consumer should read it in preference to parsing the comment.
"""
* ^url = $NexusMapTargetProvenance
* ^status = #draft
* ^experimental = false
* ^publisher = "WELLSTAR Technologies Corp."
* ^contact.name = "Nexus EMR FHIR Implementation Guide"
* ^contact.telecom.system = #url
* ^contact.telecom.value = "https://fhir.apps.health"
* ^jurisdiction = urn:iso:std:iso:3166#CA "Canada"
* ^context[0].type = #element
* ^context[0].expression = "ConceptMap.group.element.target"
* obeys nexus-mtp-1
* . ^short = "Who proposed this map target, and how confident they are"
* extension contains
provenance 1..1 MS and
confidence 1..1 MS
* extension[provenance].value[x] only code
* extension[provenance].valueCode from NexusMapTargetProvenanceKindVS (extensible)
* extension[provenance] ^short = "jev | interim-rule"
* extension[provenance] ^definition = "The source that proposed this target. Extensible: a later curator is a new code."
* extension[confidence].value[x] only decimal
* extension[confidence] ^short = "The source's confidence in this target, 0 to 1"
* extension[confidence] ^definition = "The source's confidence that this target is right, from 0 to 1, to two decimals, rounded down. Comparable across sources: a rule-based source never states more than the lowest confidence a classifier target can carry."