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

Commit

Permalink
RCFHIRAPI-807: Added documentation for custon encounter search
Browse files Browse the repository at this point in the history
  • Loading branch information
NanditaJ committed Sep 14, 2023
1 parent 5479892 commit f57fcb5
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 3 deletions.
30 changes: 27 additions & 3 deletions content/millennium/r4/financial/general/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ The following fields are returned if valued:

## Extensions

* [Account Related Parts]
* [Account Balance]
* [Account State]
1. [Account Related Parts]
2. [Account Balance]
3. [Account State]
4. [Associated Encounter]

### Custom Extensions

Expand All @@ -57,6 +58,7 @@ All URLs for custom extensions are defined as `https://fhir-ehr.cerner.com/r4/St
`account-related-parts` | [`Reference`] | A reference to other related Accounts.
`account-balance` | [`Money`] | Represents the account balance.
`account-state` | [`CodeableConcept`] | The status of the Account within the billing or correspondence workflow.
`associated-encounter` | [`Reference`] | The encounter associated with the resource.

## Search

Expand All @@ -82,16 +84,19 @@ _Implementation Notes_
`type` | See notes | [`token`] | The specific type of account. Example: `financial-account`
`patient` | See notes | [`reference`] | The entity that caused the expenses. Example: `Patient/12345`
`-guarantor` | See notes | [`reference`] | The parties responsible for balancing the account. Example: `6330015-6330017`
`-encounter` | See notes | [`reference`] | The id to identify the encounter. Example: `98028029`
`_count` | no | [`number`] | The maximum number of results to return. Defaults to `10`.

Notes:

* You may search via:
* `_id` alone
* `-encounter` and `type` set to 'guarantor-balance'
* `patient`, `identifier`, and `type` set to 'statement'
* `-guarantor` and `type` set to 'financial-account'
* When searching via `identifier`, the system must be 'https://fhir.cerner.com/<EHR source id>/statement-number'. You may not search via `identifier` with a system of 'https://fhir.cerner.com/<EHR source id>/account-number'.
* The `-guarantor` search parameter should contain a reference to a RelatedPerson when set.
* The `-encounter` search parameter should contain a Clinical Encounter Id.

### Headers

Expand All @@ -108,6 +113,24 @@ Notes:
<%= headers status: 200 %>
<%= json(:r4_account_search) %>

#### Request - `_id`

GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Account?_id=G71248138

#### Response

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

#### Request - `-encounter`

GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Account??encounter=98028029&type=guarantor-balance

#### Response

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

#### Request - `patient`, `identifier`, and `type`

GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Account?identifier=https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/statement-number|68002&patient=6330017&type=statement
Expand Down Expand Up @@ -173,4 +196,5 @@ The common [errors] and [OperationOutcomes] may be returned.
[Account Related Parts]: #custom-extensions
[Account Balance]: #custom-extensions
[Account State]: #custom-extensions
[Associated Encounter]: #custom-extensions
[Account.subject]: http://hl7.org/fhir/R4/account-definitions.html#Account.subject
144 changes: 144 additions & 0 deletions lib/resources/example_json/r4_examples_account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ module Resources
'currency': 'USD'
}
},
{
'valueReference': {
'reference': 'Encounter/98028029'
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/associated-encounter'
},
{
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/account-state',
'valueCodeableConcept': {
Expand Down Expand Up @@ -109,6 +115,144 @@ module Resources
]
}.freeze

R4_ACCOUNT_SEARCH_GUARANTOR_ID ||= {
'resourceType': 'Bundle',
'id': '25620975-ee28-49d7-84b2-a360a97c4c06',
'type': 'searchset',
'total': 1,
'link': [
{
'relation': 'self',
'url': 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Account?_id=G71248138'
}
],
'entry': [
{
'fullUrl': 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Account/G71248138',
'resource': {
'resourceType': 'Account',
'id': 'G71248138',
'text': {
'status': 'generated',
'div': '&lt;div xmlns=\&quot;http://www.w3.org/1999/xhtml\&quot;&gt;&lt;p&gt;&lt;b&gt;Account&lt;'\
'/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Account Type&lt;/b&gt;: guarantor-balance&lt;'\
'/p&gt;&lt;p&gt;&lt;b&gt;Service Period Start Date&lt;/b&gt;: Jan 1, 2024 7:15 P.M. UTC<&lt;'\
'/p&gt;&lt;p&gt;&lt;b&gt;Status&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;:Active&lt;/p&gt;&lt;/div&gt;'
},
'extension': [
{
'valueMoney': {
'value': '-5.00',
'currency': 'USD'
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/account-balance'
},
{
'valueReference': {
'reference': 'Encounter/98028029'
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/associated-encounter'
},
{
'valueCodeableConcept': {
'coding': [
{
'system': 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/24451',
'code': '629234',
'display': 'Ready to bill',
'userSelected': true
}
],
'text': 'Ready to bill'
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/account-state'
}
],
'status': 'active',
'type': {
'text': 'guarantor-balance'
},
'servicePeriod': {
'start': '2024-01-01T19:15:00Z'
},
'partOf': {
'reference': 'Account/F61886238'
}
}
}
]
}.freeze

R4_ACCOUNT_SEARCH_ENCOUNTER ||= {
'resourceType': 'Bundle',
'id': '25620975-ee28-49d7-84b2-a360a97c4c06',
'type': 'searchset',
'total': 1,
'link': [
{
'relation': 'self',
'url': 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Account'\
'?encounter=98028029&type=guarantor-balance'
}
],
'entry': [
{
'fullUrl': 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Account'\
'?encounter=98028029&type=guarantor-balance',
'resource': {
'resourceType': 'Account',
'id': 'G71248138',
'text': {
'status': 'generated',
'div': '&lt;div xmlns=\&quot;http://www.w3.org/1999/xhtml\&quot;&gt;&lt;p&gt;&lt;b&gt;Account&lt;'\
'/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Account Type&lt;/b&gt;: guarantor-balance&lt;'\
'/p&gt;&lt;p&gt;&lt;b&gt;Service Period Start Date&lt;/b&gt;: Jan 1, 2024 7:15 P.M. UTC<&lt;'\
'/p&gt;&lt;p&gt;&lt;b&gt;Status&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;:Active&lt;/p&gt;&lt;/div&gt;'
},
'extension': [
{
'valueMoney': {
'value': '-5.00',
'currency': 'USD'
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/account-balance'
},
{
'valueReference': {
'reference': 'Encounter/98028029'
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/associated-encounter'
},
{
'valueCodeableConcept': {
'coding': [
{
'system': 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/24451',
'code': '629234',
'display': 'Ready to bill',
'userSelected': true
}
],
'text': 'Ready to bill'
},
'url': 'https://fhir-ehr.cerner.com/r4/StructureDefinition/account-state'
}
],
'status': 'active',
'type': {
'text': 'guarantor-balance'
},
'servicePeriod': {
'start': '2024-01-01T19:15:00Z'
},
'partOf': {
'reference': 'Account/F61886238'
}
}
}
]
}.freeze

R4_ACCOUNT_SEARCH_STATEMENT ||= {
'resourceType': 'Bundle',
'id': '43d52c34-385f-4871-889d-f974b2422fab',
Expand Down

0 comments on commit f57fcb5

Please sign in to comment.