0.1.0 - ci-build
CAREWareFHIRDataDictionary - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
This page details how a FHIR Patient resource gets used and converted into a CAREWare approved PDI file.
The Client ID is mapped from the Patient's ID resource. This ID is used to match on CAREWare's Clients. The FHIR ID must first be matched for each CAREWare Client.
match_id
Patient.id
column match_id{
findResult id = resource.id
if id.Found{
found id
}
}
The Client's gender is mapped from the Patient's extension called 'genderidentity'. If another extension needs to be used, a modification of the CWFP file is needed when looping through the avaliable Patient's extensions.
PDI Column: cln_gender_cs_def_code
FHIR Element: Patient.extension
CWFP Implementation:
column cln_gender_cs_def_code {
findResult genderIdentity = resource.extension[findGenderID]valueCodeableConcept.coding[0]code
if genderIdentity.Found {
found genderIdentity
}
}
Other CWFP Query:
forEachObj findGenderID {
note this section of code will get run for each element in the array it is assigned to
findResult codingsys = url
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'genderidentity' {
found codingsys
}
}
}
The Client's gender is mapped from the Patient's extension called 'genderidentity'. If another extension needs to be used, a modification of the CWFP file is needed when looping through the avaliable Patient's extensions.
PDI Column: cln_eth_def_code
FHIR Element: Patient.extension
CWFP Implementation:
column cln_ethnicity_cs_def_code{
findResult eth = resource.extension[findEthnicity]extension[0]valueString
if eth.Found{
found eth
}
}
Other CWFP Query:
forEachObj findEthnicity {
note this section of code will get run for each element in the array it is assigned to
findResult codingsys = url
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'us-core-ethnicity' {
found codingsys
}
}
}
The Client's last name is mapped from the Patient's extension called ''. If another extension needs to be used, a modification of the CWFP file is needed when looping through the avaliable Patient's extensions.
PDI Column: cln_last_name
FHIR Element: Patient.name
CWFP Implementation:
column cln_last_name{
findResult name = resource.name[findNamePair]extension[0]valueString
if name.Found{
found name
}
}
forEachObj findNamePair {
note this section of code will get run for each element in the array it is assigned to
findResult name = given
if name.Found {
found name
}
}
PDI Column: cln_first_name
FHIR Element: Patient.name
CWFP Implementation:
column cln_first_name{
findResult name = resource.name[findNamePair]given[0]
if name.Found{
found name
}
}
forEachObj findNamePair {
note this section of code will get run for each element in the array it is assigned to
findResult name = given
if name.Found {
found name
}
}
cln_middle_name
FHIR Element: Patient.name
column cln_middle_name{
findResult name = resource.name[findNamePair]given[1]
if name.Found{
found name
}
}
forEachObj findNamePair {
note this section of code will get run for each element in the array it is assigned to
findResult name = given
if name.Found {
found name
}
}
cln_preferred_name
Patient.name
column cln_preferred_name{
findResult name = resource.name[findPrefName]text
if name.Found{
found name
}
}
forEachObj findPrefName {
note this section of code will get run for each element in the array it is assigned to
findResult codingsys = use
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'usual' {
found codingsys
}
}
}
cln_race_cs_#_def_code
Patient.extension
column cln_race_cs_#_def_code{
note finds the clients race by the us-core-race coding system
findResult race = resource.extension[findRace]extension[0]valueString
if race.Found{
found race
}
}
forEachObj findRace {
note Finds the coding system of 'us-core-race'
findResult codingsys = url
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'us-core-race' {
found codingsys
}
} } ```
-PDI Column: cln_hispanic_subgroup
Patient.extension
```javascript
column cln_hispanic_subgroup{
findResult hisGroup = resource.extension[findRace]extension[0]valueString
if hisGroup.Found{
if hisGroup.StringValue.ToLower contains 'mexican'{
found '1'
}
if hisGroup.StringValue.ToLower contains 'puerto rican'{
found '2'
}
if hisGroup.StringValue.ToLower contains 'cuban'{
found '3'
}
if hisGroup.StringValue.ToLower contains 'other hispanic'{
found '4'
}
}}
- **Other CWFP Query:**
```javascript
forEachObj findRace {
note Finds the coding system of us-core-race
findResult codingsys = url
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'us-core-race' {
found codingsys
}
}
}
## Client Asian Subgroup
cln_asian_subgroup
Patient.extension
column cln_asian_subgroup{
findResult hisGroup = resource.extension[findRace]extension[0]valueString
if hisGroup.Found{
if hisGroup.StringValue.ToLower contains 'asian indian'{
found '1'
}
if hisGroup.StringValue.ToLower contains 'chinese'{
found '2'
}
if hisGroup.StringValue.ToLower contains 'filipino'{
found '3'
}
if hisGroup.StringValue.ToLower contains 'japanese'{
found '4'
}
if hisGroup.StringValue.ToLower contains 'korean'{
found '5'
}
if hisGroup.StringValue.ToLower contains 'vietnamese'{
found '6'
}
if hisGroup.StringValue.ToLower contains 'other asian'{
found '7'
}
}
}
forEachObj findRace { note Finds the coding system of us-core-race findResult codingsys = url if codingsys.Found { if codingsys.StringValue.ToLower contains 'us-core-race' { found codingsys } } }
## Client Pacific Subgroup
- **PDI Column:** `cln_pacific_subgroup`
- **FHIR Element:** `Patient.extension`
```javascript
column cln_pacific_subgroup{
findResult hisGroup = resource.extension[findRace]extension[0]valueString
if hisGroup.Found{
if hisGroup.StringValue.ToLower contains 'native hawaiian'{
found '1'
}
if hisGroup.StringValue.ToLower contains 'guamanian or chamorro'{
found '2'
}
if hisGroup.StringValue.ToLower contains 'samoan'{
found '3'
}
if hisGroup.StringValue.ToLower contains 'other pacific islander'{
found '4'
}
}
}
forEachObj findRace { note Finds the coding system of us-core-race findResult codingsys = url if codingsys.Found { if codingsys.StringValue.ToLower contains 'us-core-race' { found codingsys } } }
## Client Street
- **PDI Column:** `cln_street`
- **FHIR Element:** `Patient.address`
```javascript
column cln_street{
findResult street = resource.address[findHomeUse]line[0]
if street.Found{
found street
}
}
forEachObj findHomeUse {
note this section of code will get run for each element in the array it is assigned to
findResult codingsys = use
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'home' {
found codingsys
}
} } ```
## Client City
cln_city
Patient.extension
```javascript
column cln_city{
findResult city = resource.address[findHomeUse]city
if city.Found{
found city
}}
- **Other CWFP Query:**
```javascript
forEachObj findHomeUse {
note this section of code will get run for each element in the array it is assigned to
findResult codingsys = use
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'home' {
found codingsys
}
}
}
## Client State
cln_state
Patient.extension
```javascript
column cln_city{
findResult city = resource.address[findHomeUse]city
if city.Found{
found city
}}
- **Other CWFP Query:**
```javascript
forEachObj findHomeUse {
note this section of code will get run for each element in the array it is assigned to
findResult codingsys = use
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'home' {
found codingsys
}
}
}
## Client County - **PDI Column:** `cln_county` - **FHIR Element:** `Patient.extension` ```javascript
column cln_county{
findResult county = resource.address[findHomeUse]district
if county.Found{
found county
}
}
- **Other CWFP Query:**
```javascript
forEachObj findHomeUse {
note this section of code will get run for each element in the array it is assigned to
findResult codingsys = use
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'home' {
found codingsys
}
}
}
## Client Zip - **PDI Column:** `cln_zip` - **FHIR Element:** `Patient.extension` ```javascript
column cln_zip{
findResult zip = resource.address[findHomeUse]postalCode
if zip.Found{
found zip
} } ``` - **Other CWFP Query:** ```javascript
forEachObj findHomeUse {
note this section of code will get run for each element in the array it is assigned to
findResult codingsys = use
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'home' {
found codingsys
}
} } ```
## Client Zip - **PDI Column:** `cln_zip` - **FHIR Element:** `Patient.extension` ```javascript
column cln_zip{
findResult zip = resource.address[findHomeUse]postalCode
if zip.Found{
found zip
} } ``` - **Other CWFP Query:** ```javascript forEachObj findHomeUse {
note this section of code will get run for each element in the array it is assigned to
findResult codingsys = use
if codingsys.Found {
if codingsys.StringValue.ToLower contains 'home' {
found codingsys
}
} } ``` ## Client Phone - **PDI Column:** `cln_phone` - **FHIR Element:** `Patient.extension` ```javascript
column cln_phone{
findResult phone = resource.telecom[0]value
if phone.Found{
found phone
} } ```
## Client Phone Type
cln_phone_type
Patient.extension
column cln_phone_type{
findResult phoneType = resource.telecom[0]use
if phoneType.Found{
found phoneType
}
}
cln_mailing_phone_1
Patient.extension
column cln_mailing_phone_1{
findResult phone = resource.telecom[1]value
if phone.Found{
found phone
}
}
cln_mailing_phone_1
Patient.extension
column cln_mailing_phone_1{
findResult phone = resource.telecom[1]value
if phone.Found{
found phone
}
}
cln_mailing_phone_1
Patient.extension
column cln_mailing_phone_1_type{
findResult phoneType = resource.telecom[1]use
if phoneType.Found{
found phoneType
}
}
cln_mailing_phone_2
Patient.extension
column cln_mailing_phone_2{
findResult phone = resource.telecom[2]value
if phone.Found{
found phone
}
}
cln_dob
Patient.extension
column cln_dob {
note finds clients fhir id
findResult birthDate = resource.birthDate
if birthDate.Found{
found birthDate
}
}
cln_vital_status
Patient.extension
column cln_vital_status {
note VitalStatusID
findResult vital = resource.deceasedBoolean
if vital.Found{
if vital.StringValue contains 'false'{
found 'Alive'
}
found 'Deceased'
}
}
In this guide, we map the CSV column cln_dob
to the FHIR Patient.birthDate
field.