Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

updated physical type search, and type search for r4 location #772

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions content/millennium/r4/base/entities/location.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The following fields are returned if valued:
* [Mode](http://hl7.org/fhir/R4/location-definitions.html#Location.mode){:target="_blank"}
* [Telecom](http://hl7.org/fhir/R4/location-definitions.html#Location.telecom){:target="_blank"}
* [Address](http://hl7.org/fhir/R4/location-definitions.html#Location.address){:target="_blank"}
* [Type](https://www.hl7.org/fhir/R4/location-definitions.html#Location.type){:target="_blank"}
* [Physical Type](http://hl7.org/fhir/R4/location-definitions.html#Location.physicalType){:target="_blank"}
* [Managing Organization](http://hl7.org/fhir/R4/location-definitions.html#Location.managingOrganization){:target="_blank"}
* [Part Of](http://hl7.org/fhir/R4/location-definitions.html#Location.partOf){:target="_blank"}
Expand Down Expand Up @@ -56,13 +57,16 @@ Search for Locations that meet supplied query parameters:
Name | Required? | Type | Description
-----------------|-------------------------|------------|-------------------------------------------------------
`_id` | This or `-physicalType` | [`token`] | The logical resource id associated with the resource.
`type` | This or `_id` | [`token`] | The location’s type. Example: `http://terminology.hl7.org/CodeSystem/v3-RoleCode|PHARM`
`-physicalType` | This or `_id` | [`token`] | The location’s physical type. Example: `http://terminology.hl7.org/CodeSystem/location-physical-type|ro`
[`_count`] | no | [`number`] | The maximum number of results to return. Defaults to `100`.

Notes:

- The `-physicalType` parameter
- Searching by Millennium proprietary codes is not supported.
- The `type` parameter
- Searching by Millennium proprietary codes is not supported.

### Headers

Expand All @@ -79,6 +83,24 @@ Search for Locations that meet supplied query parameters:
<%= headers status: 200 %>
<%= json(:r4_location_bundle) %>

#### Request

GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?-physicalType=http://terminology.hl7.org/CodeSystem/location-physical-type|wa

#### Response

<%= headers status: 200 %>
<%= json(:r4_location_physical_type_bundle) %>

#### Request

GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?type=http://terminology.hl7.org/CodeSystem/v3-RoleCode|PHARM

#### Response

<%= headers status: 200 %>
<%= json(:r4_location_type_bundle) %>

<%= disclaimer %>

### Errors
Expand Down
67 changes: 63 additions & 4 deletions lib/resources/example_json/r4_examples_location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,39 @@ module Resources
"state": 'AA',
"country": 'Ireland'
},
"type": [
{
"coding": [
{
"system": "https://fhir.cerner.com/2c400054-42d8-4e74-87b7-80b5bd5fde9f/codeSet/222",
"code": "772",
"display": "Ambulatory(s)",
"userSelected": true
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"code": "OF",
"display": "Outpatient facility"
}
],
"text": "Ambulatory(s)"
}
],
"physicalType": {
"coding": [
{
"system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/222',
"code": '783',
"display": 'Facility(s)',
"code": '772',
"display": 'Ambulatory(s)',
"userSelected": true
}
},
{
"system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
"code": 'wa',
"display": 'Ward'
}
],
"text": 'Facility(s)'
"text": 'Ambulatory(s)'
},
"managingOrganization": {
"reference": 'Organization/13971625',
Expand Down Expand Up @@ -95,5 +118,41 @@ module Resources
}
]
}.freeze

R4_LOCATION_TYPE_BUNDLE ||= {
"resourceType": 'Bundle',
"id": 'f4749f7a-e67d-49d1-8b92-ddbef46eae15',
"type": 'searchset',
"link": [
{
"relation": 'self',
"url": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?type=http://terminology.hl7.org/CodeSystem/v3-RoleCode|PHARM'
}
],
"entry": [
{
"fullUrl": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?type=http://terminology.hl7.org/CodeSystem/v3-RoleCode|PHARM',
"resource": R4_LOCATION_ENTRY
}
]
}.freeze

R4_LOCATION_PHYSICAL_TYPE_BUNDLE ||= {
"resourceType": 'Bundle',
"id": 'f4749f7a-e67d-49d1-8b92-ddbef46eae15',
"type": 'searchset',
"link": [
{
"relation": 'self',
"url": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?-physicalType=http://terminology.hl7.org/CodeSystem/location-physical-type|si'
}
],
"entry": [
{
"fullUrl": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?-physicalType=http://terminology.hl7.org/CodeSystem/location-physical-type|si',
"resource": R4_LOCATION_ENTRY
}
]
}.freeze
end
end