{ "resourceType": "StructureDefinition", "text": { "status": "empty", "div": "
" }, "url": "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Condition", "version": "v0.10.0", "name": "EReferralCondition", "title": "Condition", "status": "draft", "description": "This resource is used to record detailed information about a condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.", "fhirVersion": "4.0.0", "kind": "resource", "abstract": false, "type": "Condition", "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Condition", "derivation": "constraint", "snapshot": { "element": [ { "id": "Condition", "path": "Condition", "short": "Detailed information about conditions, problems or diagnoses", "definition": "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.", "min": 0, "max": "*", "base": { "path": "Condition", "min": 0, "max": "*" }, "constraint": [ { "key": "dom-2", "severity": "error", "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", "expression": "contained.contained.empty()", "xpath": "not(parent::f:contained and f:contained)" }, { "key": "dom-4", "severity": "error", "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" }, { "key": "dom-3", "severity": "error", "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource", "expression": "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()", "xpath": "not(exists(for $contained in f:contained return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))" }, { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", "valueBoolean": true }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", "valueMarkdown": "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time." } ], "key": "dom-6", "severity": "warning", "human": "A resource should have narrative for robust management", "expression": "text.div.exists()", "xpath": "exists(f:text/h:div)" }, { "key": "dom-5", "severity": "error", "human": "If a resource is contained in another resource, it SHALL NOT have a security label", "expression": "contained.meta.security.empty()", "xpath": "not(exists(f:contained/*/f:meta/f:security))" }, { "key": "con-5", "severity": "error", "human": "Condition.clinicalStatus SHALL NOT be present if verification Status is entered-in-error", "expression": "verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code='entered-in-error').empty() or clinicalStatus.empty()", "xpath": "not(exists(f:verificationStatus/f:coding[f:system/@value='http://terminology.hl7.org/CodeSystem/condition-ver-status' and f:code/@value='entered-in-error'])) or not(exists(f:clinicalStatus))" }, { "key": "con-4", "severity": "error", "human": "If condition is abated, then clinicalStatus must be either inactive, resolved, or remission", "expression": "abatement.empty() or clinicalStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-clinical' and (code='resolved' or code='remission' or code='inactive')).exists()", "xpath": "not(exists(*[starts-with(local-name(.), 'abatement')])) or exists(f:clinicalStatus/f:coding[f:system/@value='http://terminology.hl7.org/CodeSystem/condition-clinical' and f:code/@value=('resolved', 'remission', 'inactive')])" }, { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", "valueBoolean": true }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", "valueMarkdown": "Most systems will expect a clinicalStatus to be valued for problem-list-items that are managed over time, but might not need a clinicalStatus for point in time encounter-diagnosis." } ], "key": "con-3", "severity": "warning", "human": "Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error and category is problem-list-item", "expression": "clinicalStatus.exists() or verificationStatus='entered-in-error' or category.select($this='problem-list-item').empty()", "xpath": "exists(f:clinicalStatus) or f:verificationStatus/@value='entered-in-error' or not(exists(category[@value='problem-list-item']))" } ], "mapping": [ { "identity": "rim", "map": "Entity. Role, or Act" }, { "identity": "workflow", "map": "Event" }, { "identity": "sct-concept", "map": "< 243796009 |Situation with explicit context| : 246090004 |Associated finding| = ( ( < 404684003 |Clinical finding| MINUS ( << 420134006 |Propensity to adverse reactions| OR << 473010000 |Hypersensitivity condition| OR << 79899007 |Drug interaction| OR << 69449002 |Drug action| OR << 441742003 |Evaluation finding| OR << 307824009 |Administrative status| OR << 385356007 |Tumor stage finding|)) OR < 272379006 |Event|)" }, { "identity": "v2", "map": "PPR message" }, { "identity": "rim", "map": "Observation[classCode=OBS, moodCode=EVN, code=ASSERTION, value