diff --git a/content/millennium/r4/financial/general/account.md b/content/millennium/r4/financial/general/account.md index 0236991b4..1de90ed97 100644 --- a/content/millennium/r4/financial/general/account.md +++ b/content/millennium/r4/financial/general/account.md @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/lib/resources/example_json/r4_examples_account.rb b/lib/resources/example_json/r4_examples_account.rb index 3871de34c..75b3550d3 100644 --- a/lib/resources/example_json/r4_examples_account.rb +++ b/lib/resources/example_json/r4_examples_account.rb @@ -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': { @@ -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': '<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Account<'\ + '/b></p><p><b>Account Type</b>: guarantor-balance<'\ + '/p><p><b>Service Period Start Date</b>: Jan 1, 2024 7:15 P.M. UTC<<'\ + '/p><p><b>Status</b></p><p><b>:Active</p></div>' + }, + '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': '<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Account<'\ + '/b></p><p><b>Account Type</b>: guarantor-balance<'\ + '/p><p><b>Service Period Start Date</b>: Jan 1, 2024 7:15 P.M. UTC<<'\ + '/p><p><b>Status</b></p><p><b>:Active</p></div>' + }, + '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',