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

R4_UK_BRAM_Update_Slot_include #994

Merged
merged 4 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
34 changes: 29 additions & 5 deletions content/millennium/r4/base/workflow/slot.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ _Implementation Notes_
`-location` | No | [`reference`] | A single or comma separated list of Location references. Example: `-location='5678'`
`start` | See Notes | [`date`] | The Slot date-time. Example: `start=ge2016-08-24T12:00:00.000Z&start=lt2017-01-24T12:00:00.000Z`
[`_count`] | No | [`number`] | The maximum number of results to be returned per page.
[`_include`] | No | [`string`] | Other resource entries to be returned as part of the bundle. Example: `_include=Slot:schedule`
[`_include`] | No | [`string`] | Other resource entries to be returned as part of the bundle. Example: `_include=Slot:schedule` or `_include=Schedule:actor:Practitioner`

Notes:

Expand All @@ -91,11 +91,13 @@ Notes:

* The search operation will only return free slots which are available to be booked. However, booked slots may still be retrieved when using the `_id` parameter.

* The `_include` parameter may be provided once with the value `Slot:schedule`. Example: `_include=Slot:schedule`
* The `_include` parameter may be provided once with the value `Slot:schedule` or `Schedule:actor:Practitioner`. Example: `_include=Slot:schedule` or `_include=Schedule:actor:Practitioner`

* The `_include` parameter may be provided with the `_id` parameter. Example: `_id=21265426-633867-3121665-0&_include=Slot:schedule`

* When `_include` is provided in a request to the closed endpoint, the OAuth2 token must include one of `user/Schedule.read`, `patient/Schedule.read`, or `system/Schedule.read` scopes in addition to the Slot scope.
* When `_include=Slot:schedule` is provided in a request to the closed endpoint, the OAuth2 token must include one of `user/Schedule.read`, `patient/Schedule.read` or `system/Schedule.read` scopes in addition to the Slot scope.

* When `_include=Schedule:actor:Practitioner` is provided in a request to the closed endpoint, the OAuth2 token must include one of `user/Practitioner.read`, `patient/Practitioner.read` or `system/Practitioner.read` scopes in addition to the Slot and Schedule scope.
JagatNayak marked this conversation as resolved.
Show resolved Hide resolved

### Headers

Expand Down Expand Up @@ -127,7 +129,7 @@ Notes:

### Example with Include

#### Request
#### Request when `_include=Slot:schedule`

GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Slot?service-type=https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14249|4047611&start=ge2016-01-23T22:05:47Z&start=lt2020-06-08T18:13:55Z&_include=Slot:schedule&_count=5

Expand All @@ -138,7 +140,18 @@ Notes:

<%= disclaimer %>

#### Patient Authorization Request
#### Request when `_include=Schedule:acto:Practitioner`

GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Slot?service-type=https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14249|4047611&start=ge2016-01-23T22:05:47Z&start=lt2020-06-08T18:13:55Z&_include=Schedule:acto:Practitioner&_count=5

#### Response

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

<%= disclaimer %>

#### Patient Authorization Request when `_include=Slot:schedule`

GET https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Slot?service-type=https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14249|4047611&start=ge2016-01-23T22:05:47Z&start=lt2020-06-08T18:13:55Z&_include=Slot:schedule&_count=5

Expand All @@ -149,6 +162,17 @@ Notes:

<%= disclaimer %>

#### Patient Authorization Request when `_include=Schedule:acto:Practitioner`

GET https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Slot?service-type=https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/14249|4047611&start=ge2016-01-23T22:05:47Z&start=lt2020-06-08T18:13:55Z&_include=Schedule:acto:Practitionere&_count=5

#### Response

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

<%= disclaimer %>

### Errors

The common [errors] and [OperationOutcomes] may be returned.
Expand Down
316 changes: 316 additions & 0 deletions lib/resources/example_json/r4_examples_slot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,322 @@ module Resources
]
}.freeze

R4_SLOT_BUNDLE_INCLUDE_PRACTITIONER ||= {
'resourceType': 'Bundle',
'id': 'f8dd806e-62bb-4657-8912-9c2705864d40',
'type': 'searchset',
'link': [
{
'relation': 'self',
'url': 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Slot?service-type'\
'=https%3A%2F%2Ffhir.cerner.com%2Fec2458f2-1e24-41c8-b71b-0e701af7583d%2FcodeSet%2F14249%7C'\
'4047611&start=ge2016-01-23T22%3A05%3A47Z&start=lt2020-06-08T18%3A13%3A55Z&_include=Schedule%3A'\
'actor%3APractitionerQ&_count=50'
},
{
'relation': 'next',
'url': 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Slot?_include'\
'=Schedule%3Aactor%3APractitioner&-pageContext=2d46d307-9a4c-4dc7-a1c2-88f1282d5aec&-pageDirection=NEXT'
}
],
'entry': [
{
'fullUrl': 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Slot/4047611-32216049-61518614-0',
'resource': R4_SLOT_ENTRY,
'search': {
'mode': 'match'
}
},
{
"fullUrl": 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Practitioner/593923',
"resource": {
"resourceType": 'Practitioner',
"id": '593923',
"meta": {
"versionId": '21',
"lastUpdated": '2020-07-23T16:37:26.000Z'
},
"text": {
"status": 'generated',
"div": '<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Practitioner</b></p><p><b>Name</b>:'\
'Applegate MD, Christina</p><p><b>Identifiers</b>: EXTERNALID: 1221221111, EXTERNALID:'\
'CERNERPHYSPCP, MESSAGING: 593923</p><p><b>Status</b>: Active</p></div>'
},
"extension": [
{
"valueBoolean": true,
"url": 'https://fhir-ehr.cerner.com/r4/StructureDefinition/is-physician'
}
],
"identifier": [
{
"use": 'usual',
"type": {
"text": 'External Identifier'
},
"system": 'urn:oid:2.16.840.1.113883.3.42.10001.100001.12',
"value": '1221221111',
"period": {
"start": '2021-07-13T20:12:34.000Z'
}
},
{
"use": 'usual',
"type": {
"text": 'External Identifier'
},
"_system": {
"extension": [
{
"valueCode": 'unknown',
"url": 'http://hl7.org/fhir/StructureDefinition/data-absent-reason'
}
]
},
"value": 'CERNERPHYSPCP',
"period": {
"start": '2016-04-28T15:02:02.000Z'
}
},
{
"use": 'usual',
"type": {
"coding": [
{
"system": 'http://terminology.hl7.org/CodeSystem/v2-0203',
"code": 'U',
"display": 'Unspecified identifier'
}
],
"text": 'Messaging'
},
"_system": {
"extension": [
{
"valueCode": 'unknown',
"url": 'http://hl7.org/fhir/StructureDefinition/data-absent-reason'
}
]
},
"value": '593923',
"period": {
"start": '2015-08-18T05:00:00.000Z'
}
}
],
"active": true,
"name": [
{
"use": 'usual',
"text": 'Applegate MD, Christina',
"family": 'Applegate',
"given": [
'Christina'
],
"suffix": [
'MD'
],
"period": {
"start": '2020-07-23T16:37:25.000Z'
}
}
],
"telecom": [
{
"system": 'email',
"value": '[email protected]',
"use": 'work'
}
],
"qualification": [
{
"code": {
"coding": [
{
"system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/29600',
"code": '677091',
"display": 'MD',
"userSelected": true
},
{
"system": 'http://terminology.hl7.org/CodeSystem/v2-0360%7C2.7',
"code": 'MD',
"display": 'Doctor of Medicine'
}
],
"text": 'MD'
},
"period": {
"start": '2020-05-31T05:00:00.000Z'
}
}
]
},
"search": {
"mode": 'include'
}
}
]
}.freeze

R4_SLOT_PATIENT_ACCESS_BUNDLE_INCLUDE_PRACTITIONER ||= {
'resourceType': 'Bundle',
'id': 'f8dd806e-62bb-4657-8912-9c2705864d40',
'type': 'searchset',
'link': [
{
'relation': 'self',
'url': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Slot?service-type'\
'=https%3A%2F%2Ffhir.cerner.com%2Fec2458f2-1e24-41c8-b71b-0e701af7583d%2FcodeSet%2F14249%7C'\
'4047611&start=ge2016-01-23T22%3A05%3A47Z&start=lt2020-06-08T18%3A13%3A55Z&_include=Schedule%3A'\
'actor%3APractitioner&_count=50'
},
{
'relation': 'next',
'url': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Slot?_include'\
'=Schedule%3Aactor%3APractitioner&-pageContext=2d46d307-9a4c-4dc7-a1c2-88f1282d5aec&-pageDirection=NEXT'
}
],
'entry': [
{
'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Slot/4047611-32216049-61518614-0',
'resource': R4_SLOT_PATIENT_ACCESS_ENTRY,
'search': {
'mode': 'match'
}
},
{
"fullUrl": 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Practitioner/593923',
"resource": {
"resourceType": 'Practitioner',
"id": '593923',
"meta": {
"versionId": '21',
"lastUpdated": '2020-07-23T16:37:26.000Z'
},
"text": {
"status": 'generated',
"div": '<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Practitioner</b></p><p><b>Name</b>'\
': Applegate MD, Christina</p><p><b>Identifiers</b>: EXTERNALID: 1221221111, EXTERNALID:'\
'CERNERPHYSPCP, MESSAGING: 593923</p><p><b>Status</b>: Active</p></div>'
},
"extension": [
{
"valueBoolean": true,
"url": 'https://fhir-ehr.cerner.com/r4/StructureDefinition/is-physician'
}
],
"identifier": [
{
"use": 'usual',
"type": {
"text": 'External Identifier'
},
"system": 'urn:oid:2.16.840.1.113883.3.42.10001.100001.12',
"value": '1221221111',
"period": {
"start": '2021-07-13T20:12:34.000Z'
}
},
{
"use": 'usual',
"type": {
"text": 'External Identifier'
},
"_system": {
"extension": [
{
"valueCode": 'unknown',
"url": 'http://hl7.org/fhir/StructureDefinition/data-absent-reason'
}
]
},
"value": 'CERNERPHYSPCP',
"period": {
"start": '2016-04-28T15:02:02.000Z'
}
},
{
"use": 'usual',
"type": {
"coding": [
{
"system": 'http://terminology.hl7.org/CodeSystem/v2-0203',
"code": 'U',
"display": 'Unspecified identifier'
}
],
"text": 'Messaging'
},
"_system": {
"extension": [
{
"valueCode": 'unknown',
"url": 'http://hl7.org/fhir/StructureDefinition/data-absent-reason'
}
]
},
"value": '593923',
"period": {
"start": '2015-08-18T05:00:00.000Z'
}
}
],
"active": true,
"name": [
{
"use": 'usual',
"text": 'Applegate MD, Christina',
"family": 'Applegate',
"given": [
'Christina'
],
"suffix": [
'MD'
],
"period": {
"start": '2020-07-23T16:37:25.000Z'
}
}
],
"telecom": [
{
"system": 'email',
"value": '[email protected]',
"use": 'work'
}
],
"qualification": [
{
"code": {
"coding": [
{
"system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/29600',
"code": '677091',
"display": 'MD',
"userSelected": true
},
{
"system": 'http://terminology.hl7.org/CodeSystem/v2-0360%7C2.7',
"code": 'MD',
"display": 'Doctor of Medicine'
}
],
"text": 'MD'
},
"period": {
"start": '2020-05-31T05:00:00.000Z'
}
}
]
},
"search": {
"mode": 'include'
}
}
]
}.freeze

R4_SLOT_PATCH ||= [
{
'op': 'replace',
Expand Down
Loading