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

Review and updates for Location #1001

Merged
merged 7 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
26 changes: 14 additions & 12 deletions content/millennium/r4/base/entities/location.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,24 @@ Search for Locations that meet supplied query parameters:
----------------------|-------------------------|--------------|-------------------------------------------------------
`_id` | This or `-physicalType` | [`token`] | The logical resource id associated with the resource.
`-physicalType` | This or `_id` | [`token`] | The location’s physical type. Example: `http://terminology.hl7.org/CodeSystem/location-physical-type|ro`
`identifier` | no | [`token`] | The location’s identifier. Example: `653385|FSI^~BUILD^~NU`
[`_count`] | no | [`number`] | The maximum number of results to return. Defaults to `100`.
`address` | no | [`string`] | A (part of the) address of the location.
`address-city` | no | [`string`] | A city specified in an address
`address-state` | no | [`string`] | A state specified in an address
`address-postalcode` | no | [`string`] | A postal code specified in an address
`name` | no | [`string`] | A portion of the location's name or alias
`organization` | no | [`reference`]| Searches for locations that are managed by the provided organization
`identifier` | No | [`token`] | The location’s identifier. Example: `653385|FSI^~BUILD^~NU`
[`_count`] | No | [`number`] | The maximum number of results to return. Defaults to `100`
`address` | No | [`string`] | A (part of the) address of the location. Example: `123%20Main`
`address-city` | No | [`string`] | A city specified in an address. Example: `Kansas`
`address-state` | No | [`string`] | A state specified in an address. Example: `MO`
`address-postalcode` | No | [`string`] | A postal code specified in an address. Example: `64111`
`name` | No | [`string`] | A portion of the location's name or alias. Example: `Main`
`organization` | No | [`reference`]| Searches for locations that are managed by the provided organization. Example: `675844`


Notes:

- The `-physicalType` parameter
- Searching by Millennium proprietary codes is not supported.
- The `-address-city` parameter
- needs address-state or address-postalcode while searching with address-city
- must be accompanied with any of following: `address-state` or `address-postalcode`
- The `name` and `organization` parameters
- must be accompanied with any of following: `-physicalType`, `identifier`, `address`, `address-state`, `address-city`, or `address-postalcode`

### Headers

Expand Down Expand Up @@ -113,7 +115,7 @@ Search for Locations that meet supplied query parameters:

#### Request

GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address=PA
GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address=MO

#### Response

Expand All @@ -126,7 +128,7 @@ Search for Locations that meet supplied query parameters:

#### Request

GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address-state=PA&address-city=Malvern
GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address-state=MO&address-city=Kansas

#### Response

Expand All @@ -152,7 +154,7 @@ Search for Locations that meet supplied query parameters:

#### Request

GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address=kansas&organization=3054032
GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address=kansas&organization=667844

#### Response

Expand Down
200 changes: 61 additions & 139 deletions lib/resources/example_json/r4_examples_location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,85 +112,79 @@ module Resources
}.freeze

R4_LOCATION_ADDRESS_ENTRY ||= {
"resourceType": 'Location',
"id": '982243103',
"meta": {
"versionId": '0',
"lastUpdated": '2019-03-29T14:40:50Z'
},
"text": {
"status": 'generated',
"div": '<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Location</b></p><p><b>Name</b>: '\
'Anushka Org One</p><p><b>Alias</b>: ADOne</p><p><b>Managing Organization</b>: Anushka Org One</p>'\
'<p><b>Physical Type</b>: Facility(s)</p><p><b>Status</b>: Active</p></div>'
},
"identifier": [
{
"use": 'official',
"type": {
"coding": [
"system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/73',
"code": 'ACCTRECEIVABLE',
"display": 'FIN NBR',
"userSelected": true
]
},
"system": 'FIN NBR',
"value": '16000'
}
],
"status": 'active',
"name": 'Anushka Org One',
"alias": [
'ADOne'
],
"mode": 'instance',
"address": {
"use": 'work',
"text": "111th West st\nMalvern, PA 19355\nUSA",
"line": [
'111th West st'
"fullUrl": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location/20573078',
"resource": {
"resourceType": 'Location',
"id": '20573078',
"meta": {
"versionId": '20',
"lastUpdated": '2018-05-22T16:42:00Z'
},
"text": {
"status": 'generated',
# rubocop:disable Layout/LineLength
"div": '<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Location</b></p><p><b>Name</b>: Model Behavioral Health Clinic</p><p><b>Alias</b>: MX BH CL</p><p><b>Managing Organization</b>: Model Behavioral Health Clinic</p><p><b>Physical Type</b>: Facility(s)</p><p><b>Status</b>: Active</p></div>'
# rubocop:enable Layout/LineLength
},
"status": 'active',
"name": 'Model Behavioral Health Clinic',
"alias": [
'MX BH CL'
],
"city": 'Malvern',
"state": 'PA',
"postalCode": '19355',
"country": 'USA'
},
"physicalType": {
"coding": [
"mode": 'instance',
"telecom": [
{
"system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/222',
"code": '783',
"display": 'Facility(s)',
"userSelected": true
},
{
"system": 'http://terminology.hl7.org/CodeSystem/location-physical-type',
"code": 'si',
"display": 'Site'
"system": 'phone',
"value": '555 555 0001'
}
],
"text": 'Facility(s)'
},
"managingOrganization": {
"reference": 'Organization/28096355',
"display": 'Anushka Org One'
"address": {
"use": 'work',
"text": '1234 Main\nKansas City, MO 64111\nUS',
"line": [
'1234 Main'
],
"city": 'Kansas City',
"state": 'MO',
"postalCode": '64111',
"country": 'US'
},
"physicalType": {
"coding": [
{
"system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/222',
"code": '783',
"display": 'Facility(s)',
"userSelected": true
},
{
"system": 'http://terminology.hl7.org/CodeSystem/location-physical-type',
"code": 'si',
"display": 'Site'
}
],
"text": 'Facility(s)'
},
"managingOrganization": {
"reference": 'Organization/667844',
"display": 'Model Behavioral Health Clinic'
}
}
}.freeze

R4_LOCATION_ADDRESS_BUNDLE ||= {
"resourceType": 'Bundle',
"id": 'f4749f7a-e67d-49d1-8b92-ddbef46eae15',
"id": 'd7638736-7e04-4e36-9fd1-357159396499',
"type": 'searchset',
"link": [
{
"relation": 'self',
"url": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address=PA'
"url": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address=MO'
}
],
"entry": [
{
"fullUrl": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address=PA',
"fullUrl": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address=MO',
"resource": R4_LOCATION_ADDRESS_ENTRY
}
]
Expand All @@ -203,12 +197,12 @@ module Resources
"link": [
{
"relation": 'self',
"url": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address-state=PA&address-city=Malvern'
"url": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address-state=MO&address-city=Kansas'
}
],
"entry": [
{
"fullUrl": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address-state=PA&address-city=Malvern',
"fullUrl": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address-state=MO&address-city=Kansas',
"resource": R4_LOCATION_ADDRESS_ENTRY
}
]
Expand Down Expand Up @@ -311,85 +305,13 @@ module Resources
"link": [
{
"relation": 'self',
"url": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address=kansas&organization=3054032'
"url": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location?address=kansas&organization=667844'
}
],
"entry": [
{
"fullUrl": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location/2554914033',
"resource": {
"resourceType": 'Location',
"id": '2554914033',
"meta": {
"versionId": '0',
"lastUpdated": '2017-09-19T17:38:08Z'
},
"text": {
"status": 'generated',
"div": '<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Location</b></p>'\
'<p><b>Name</b>: ABC Taxi Company</p><p><b>Alias</b>: ABC Taxi</p>'\
'<p><b>Managing Organization</b>: ABC Taxi Company</p>'\
'<p><b>Physical Type</b>: Facility(s)</p><p><b>Status</b>: Active</p></div>'
},
"identifier": [
{
"use": 'official',
"type": {
"coding": [
"system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/73',
"code": 'ACCTRECEIVABLE',
"display": 'FIN NBR',
"userSelected": true
]
},
"system": 'FIN NBR',
"value": '16000'
}
],
"status": 'active',
"name": 'ABC Taxi Company',
"alias": [
'ABC Taxi'
],
"mode": 'instance',
"telecom": [
{
"system": 'phone',
"value": '8168769999'
}
],
"address": {
"use": 'work',
"text": "123 Main Street\nKansas City, MO 64117\nUS",
"line": [
'123 Main Street'
],
"city": 'Kansas City',
"state": 'MO',
"postalCode": '64117',
"country": 'US'
},
"physicalType": {
"coding": [
{
"system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/222',
"code": '783',
"display": 'Facility(s)',
"userSelected": true
},
{
"system": 'http://terminology.hl7.org/CodeSystem/location-physical-type',
"code": 'si',
"display": 'Site'
}
],
"text": 'Facility(s)'
},
"managingOrganization": {
"reference": 'Organization/3054032',
"display": 'ABC Taxi Company'
}
}
"fullUrl": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Location/20573078',
"resource": R4_LOCATION_ADDRESS_ENTRY
}
]
}.freeze
Expand Down
Loading