CodeSystem Subsumption testing

Overview

Test the subsumption relationship between code/Coding A and code/Coding B given the semantics of subsumption in the underlying code system. For more details, see the official documentation FHIR CodeSystem $subsumes

Api

1
URL: [base]/CodeSystem/$subsumes
Copied!
1
URL: [base]/CodeSystem/[id]/$subsumes
Copied!

Parameters

Parameter
Type
Status
Example
codeA
​code​
supported
​code​
codeB
​code​
supported
​code​
system
​uri​
supported
​system​
codingA
​Coding​
supported
​coding​
codingB
​Coding​
supported
​coding​
version
​string​
not supported
-

Examples

We will use goal-status CodeSystem which consists of :
Code
Parent codes
accepted
-
achieved
["accepted"]
ahead-of-target
["accepted", "in-progress"]
behind-target
["accepted", "in-progress"]
cancelled
-
entered-in-error
-
in-progress
["accepted"]
on-hold
["accepted"]
on-target
["accepted", "in-progress"]
planned
["accepted"]
proposed
-
rejected
-
sustaining
["accepted", "in-progress"]

Result of subsumption

The subsumption relationship between code/Coding "A" and code/Coding "B". There are 4 possible codes to be returned: equivalent, subsumes, subsumed-by, and not-subsumed. If the server is unable to determine the relationship between the codes/Codings, then it returns an error.

Requests examples

With code

equivalent
Request
Response
1
GET [base]/CodeSystem/$subsumes?system=http://hl7.org/fhir/goal-status&codeA=accepted&codeB=accepted
Copied!
or:
1
POST [base]/CodeSystem/$subsumes
2
{
3
"resourceType" : "Parameters",
4
"parameter" : [
5
{
6
"name" : "system",
7
"valueUri" : "http://hl7.org/fhir/goal-status"
8
},
9
{
10
"name": "codeA",
11
"valueCode": "accepted"
12
},
13
{
14
"name": "codeB",
15
"valueCode": "accepted"
16
}
17
]
18
}
Copied!
1
{
2
"resourceType": "Parameters",
3
"parameter": [
4
{
5
"name": "outcome",
6
"value": {
7
"code": "equivalent"
8
}
9
}
10
]
11
}
Copied!
subsumes
Request
Response
1
GET [base]/CodeSystem/$subsumes?system=http://hl7.org/fhir/goal-status&codeA=accepted&codeB=achieved
Copied!
or:
1
POST [base]/CodeSystem/$subsumes
2
{
3
"resourceType" : "Parameters",
4
"parameter" : [
5
{
6
"name" : "system",
7
"valueUri" : "http://hl7.org/fhir/goal-status"
8
},
9
{
10
"name": "codeA",
11
"valueCode": "accepted"
12
},
13
{
14
"name": "codeB",
15
"valueCode": "achieved"
16
}
17
]
18
}
Copied!
1
{
2
"resourceType": "Parameters",
3
"parameter": [
4
{
5
"name": "outcome",
6
"value": {
7
"code": "subsumed"
8
}
9
}
10
]
11
}
Copied!
subsumed-by
Request
Response
1
GET [base]/CodeSystem/$subsumes?system=http://hl7.org/fhir/goal-status&codeA=achieved&codeB=accepted
Copied!
or:
1
POST [base]/CodeSystem/$subsumes
2
{
3
"resourceType" : "Parameters",
4
"parameter" : [
5
{
6
"name" : "system",
7
"valueUri" : "http://hl7.org/fhir/goal-status"
8
},
9
{
10
"name": "codeA",
11
"valueCode": "achieved"
12
},
13
{
14
"name": "codeB",
15
"valueCode": "accepted"
16
}
17
]
18
}
Copied!
1
{
2
"resourceType": "Parameters",
3
"parameter": [
4
{
5
"name": "outcome",
6
"value": {
7
"code": "subsumed-by"
8
}
9
}
10
]
11
}
Copied!
not-subsumed
Request
Response
1
GET [base]/CodeSystem/$subsumes?system=http://hl7.org/fhir/goal-status&codeA=cancelled&codeB=proposed
Copied!
or:
1
POST [base]/CodeSystem/$subsumes
2
{
3
"resourceType" : "Parameters",
4
"parameter" : [
5
{
6
"name" : "system",
7
"valueUri" : "http://hl7.org/fhir/goal-status"
8
},
9
{
10
"name": "codeA",
11
"valueCode": "cancelled"
12
},
13
{
14
"name": "codeB",
15
"valueCode": "proposed"
16
}
17
]
18
}
Copied!
1
{
2
"resourceType": "Parameters",
3
"parameter": [
4
{
5
"name": "outcome",
6
"value": {
7
"code": "not-subsumed"
8
}
9
}
10
]
11
}
Copied!

With Coding

You will receive same subsumption results
Request
Response
1
POST [base]/CodeSystem/$subsumes
2
{
3
"resourceType" : "Parameters",
4
"parameter" : [
5
{
6
"name" : "system",
7
"valueUri" : "http://hl7.org/fhir/goal-status"
8
},
9
{
10
"name": "codingA",
11
"valueCoding": {
12
"code": "accepted"
13
}
14
},
15
{
16
"name": "codingB",
17
"valueCoding": {
18
"code": "achieved"
19
}
20
}
21
]
22
}
Copied!
1
{
2
"resourceType": "Parameters",
3
"parameter": [
4
{
5
"name": "outcome",
6
"value": {
7
"code": "subsumed"
8
}
9
}
10
]
11
}
Copied!
You can also combine code and Coding
Request
Response
1
POST [base]/CodeSystem/$subsumes
2
{
3
"resourceType" : "Parameters",
4
"parameter" : [
5
{
6
"name" : "system",
7
"valueUri" : "http://hl7.org/fhir/goal-status"
8
},
9
{
10
"name": "codingA",
11
"valueCoding": {
12
"code": "accepted"
13
}
14
},
15
{
16
"name": "codeB",
17
"valueCode": "achieved"
18
}
19
]
20
}
Copied!
1
{
2
"resourceType": "Parameters",
3
"parameter": [
4
{
5
"name": "outcome",
6
"value": {
7
"code": "subsumed"
8
}
9
}
10
]
11
}
Copied!
​
Last modified 8mo ago