Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
#
# (C) Copyright IBM Corp. 2021, 2022
#
# SPDX-License-Identifier: Apache-2.0
#
---
# Coverage required fields
# Status
# Beneficiary (Patient)
# Payor
resourceType: Coverage
id:
type: STRING
valueOf: "GeneralUtils.generateResourceId()"
expressionType: JEXL
identifier_1:
condition: $valueIn NOT_NULL
valueOf: datatype/Identifier_var
generateList: true
expressionType: resource
vars:
valueIn: IN1.2.1
systemCX: IN1.2.3
constants:
system: "http://terminology.hl7.org/CodeSystem/v2-0203"
code: "XV"
display: "Health Plan Identifier"
identifier_2:
condition: $valueIn NOT_NULL
valueOf: datatype/Identifier_var
generateList: true
expressionType: resource
vars:
valueIn: IN1.2.4
systemCX: IN1.2.6
constants:
system: "http://terminology.hl7.org/CodeSystem/v2-0203"
code: "XV"
display: "Health Plan Identifier"
identifier_3:
condition: $valueIn NOT_NULL
valueOf: datatype/Identifier_var
generateList: true
expressionType: resource
vars:
valueIn: IN1.46
# No systemCX set for this identifier
constants:
system: "http://terminology.hl7.org/CodeSystem/v2-0203"
code: "XV"
display: "Health Plan Identifier"
use: "old"
identifier_4:
condition: $valueIn NOT_NULL
valueOf: datatype/Identifier_var
generateList: true
expressionType: resource
vars:
valueIn: IN2.61 | IN1.36
# No systemCX set for this identifier
constants:
system: "http://terminology.hl7.org/CodeSystem/v2-0203"
code: "MB"
display: "Member Number"
identifier_5:
condition: $valueIn NOT_NULL
valueOf: datatype/Identifier_var
generateList: true
expressionType: resource
vars:
valueIn: IN2.8
# No systemCX set for this identifier
constants:
system: "http://terminology.hl7.org/CodeSystem/v2-0203"
code: "MA"
display: "Patient Medicaid number"
identifier_6:
condition: $valueIn NOT_NULL
valueOf: datatype/Identifier_var
generateList: true
expressionType: resource
vars:
valueIn: IN2.6
# No systemCX set for this identifier
constants:
system: "http://terminology.hl7.org/CodeSystem/v2-0203"
code: "MC"
display: "Patient's Medicare number"
identifier_7:
condition: $valueIn NOT_NULL
valueOf: datatype/Identifier_var
generateList: true
expressionType: resource
vars:
valueIn: IN1.36
# No systemCX set for this identifier
constants:
system: "http://terminology.hl7.org/CodeSystem/v2-0203"
code: "SN"
display: "Subscriber Number"
# Status is required, but it comes from a non-table 2 char ST
# It MUST be one of: active | cancelled | draft | entered-in-error
# For now, until we get a good mapping, assume all records are active
status:
type: STRING
default: active
valueOf: $active
# valueOf: IN1.45 value will come from IN1.45, but we don't yet have a mapping.
expressionType: HL7Spec
constants:
active: "active"
payor_1:
valueOf: resource/Organization
expressionType: reference
generateList: true
vars:
orgName: String, IN1.4.1
orgIdValue: String, IN1.3.1 # used for Id and Identifier
orgIdSystem: String, IN1.3.4
orgIdTypeCode: String, IN1.3.5
orgIdStart: IN1.3.7
orgIdEnd: IN1.3.8
orgAddressXAD: IN1.5
orgContactXCN: IN1.6
orgContactPointXTN: IN1.7
orgCompanyPlanCode: IN1.35
payor_2:
valueOf: resource/Organization
expressionType: reference
generateList: true
vars:
# NOTE FHIR does not require Organization.name, but we do
# for an unknown reason. This is documented in Issue #422
orgName: String, IN2.25.1
orgIdValue: String, IN2.25.1 # used for Id and Identifier
orgIdSystem: String, IN2.25.4
orgIdTypeCode: String, IN2.25.5
orgIdStart: IN2.25.7
orgIdEnd: IN2.25.8
policyHolder:
valueOf: resource/Organization
expressionType: reference
vars:
orgName: String, IN2.69.1
orgIdValue: String, IN2.69.10 # used for Id and Identifier
orgIdSystem: String, IN2.69.6
# Using coding does intelligent system lookup, field knows its table is 0203
orgIdTypeCoding: CODING_SYSTEM_V2_IS_USER_DEFINED_TABLE, IN2.69.7
# If the subscriber from IN1.17 is in the list of relationship codes needing a relatedPerson, create one
subscriber_1a:
condition: $createRelatedPerson NOT_NULL && $createRelatedPerson EQUALS TRUE
valueOf: resource/RelatedPerson
expressionType: reference
vars:
createRelatedPerson: RELATED_PERSON_NEEDED_IN117, IN1.17
# Related person gets many values from scope, so they do not need to be passed in
# IN1 and sub-fields
# $Patient
# If IN1.17 is empty and the subscriber from IN2.72 is in the list of relationship codes needing a relatedPerson, create one
subscriber_1b:
condition: $valueIn117 NULL && $createRelatedPerson NOT_NULL && $createRelatedPerson EQUALS TRUE
valueOf: resource/RelatedPerson
expressionType: reference
vars:
createRelatedPerson: RELATED_PERSON_NEEDED_IN272, IN2.72
valueIn117: IN1.17.1
# Related person gets many values from scope, so they do not need to be passed in
# IN1 and sub-fields
# $Patient
# If the subscriber is SEL (self), do not create a relatedPerson, but reference the patient
subscriber_2a:
condition: $subscriberValue EQUALS SEL
valueOf: datatype/Reference
expressionType: resource
specs: $Patient
vars:
subscriberValue: String, IN1.17.1 # subscriber relationship
# If IN1.17 is empty and subscriber is 01 (self), do not create a relatedPerson, but reference the patient
subscriber_2b:
condition: $valueIn117 NULL && $subscriberValue EQUALS 01
valueOf: datatype/Reference
expressionType: resource
specs: $Patient
vars:
subscriberValue: String, IN2.72 # subscriber relationship
valueIn117: IN1.17.1 # checking this ensures it has priority over IN2.72
subscriberId:
type: STRING
valueOf: IN1.36
expressionType: HL7Spec
# Relationship may be SEL (self)
relationship_1a:
valueOf: datatype/CodeableConcept
expressionType: resource
generateList: true
condition: $coding NOT_NULL
vars:
coding: SUBSCRIBER_RELATIONSHIP_IN117, IN1.17
text: String, IN1.17.2
# When IN1.17 is empty, use IN2.72 as the relationship
relationship_1b:
valueOf: datatype/CodeableConcept
expressionType: resource
generateList: true
condition: $valueIn117 NULL && $coding NOT_NULL
vars:
coding: SUBSCRIBER_RELATIONSHIP_IN272, IN2.72
valueIn117: IN1.17.1
text: String, IN2.72.2
beneficiary:
valueOf: datatype/Reference
expressionType: resource
specs: $Patient
class_1:
valueOf: secondary/Class
generateList: true
expressionType: resource
vars:
classValue: String, IN1.8
class_2:
valueOf: secondary/Class
generateList: true
expressionType: resource
specs: IN1.9
period:
valueOf: datatype/Period
expressionType: resource
vars:
start: IN1.12
end: IN1.13
order:
type: INTEGER
valueOf: IN1.22 | IN1.1
expressionType: HL7Spec