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

Patient Overview Old

CAREWARE FHIR Patient Resource Overview

This page details how a FHIR Patient resource gets used and converted into a CAREWare approved PDI file.

Client ID Mapping

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.

  • PDI Column: match_id
  • FHIR Element: Patient.id
  • CWFP Implementation:
    column match_id{
     findResult id = resource.id
     if id.Found{
         found id
     }
    }
    

Client Gender Mapping

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
    
          }
    
        }  
      }
    

Client Ethinicty

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
    
          }
    
        }  
      }
      
    

Client Last Name

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
      }
      }
    
    • Other CWFP Query:
      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
      
          }	
      }
      

Client First 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
        }
      }
    
    
    • Other CWFP Query:
      
      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
          }	
      }
      

Client Middle Name

  • PDI Column: cln_middle_name
  • FHIR Element: Patient.name

      column cln_middle_name{
        findResult name = resource.name[findNamePair]given[1]
        if name.Found{
          found name
        }
      }
    
    • Other CWFP Query:
      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
          }	
      }
      

Client Preferred Name

  • PDI Column: cln_preferred_name
  • FHIR Element: Patient.name
    
    column cln_preferred_name{
	  findResult name = resource.name[findPrefName]text
	  if name.Found{
		  found name
	  }
	}
  • Other CWFP Query:

  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
			
		}
		
	  }	
  }

Client Race Code

  • PDI Column: cln_race_cs_#_def_code
  • FHIR Element: 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
	  }
  }
  • 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 Hispanic Subgroup

-PDI Column: cln_hispanic_subgroup

  • FHIR Element: 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

  • PDI Column: cln_asian_subgroup
  • FHIR Element: 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'
         }
     }
    }
    
  • 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 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'
		}
	}

}
  • 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 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
	}
	
}
  • 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 City

  • PDI Column: cln_city
  • FHIR Element: 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

  • PDI Column: cln_state
  • FHIR Element: 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

  • PDI Column: cln_phone_type
  • FHIR Element: Patient.extension
      column cln_phone_type{
      findResult phoneType = resource.telecom[0]use
      if phoneType.Found{
          found phoneType
      }
    }
    

    Client Mailing Phone 1

  • PDI Column: cln_mailing_phone_1
  • FHIR Element: Patient.extension
      column cln_mailing_phone_1{
      findResult phone = resource.telecom[1]value
      if phone.Found{
          found phone
      }	
    }
    

    Client Mailing Phone 1

  • PDI Column: cln_mailing_phone_1
  • FHIR Element: Patient.extension
      column cln_mailing_phone_1{
      findResult phone = resource.telecom[1]value
      if phone.Found{
          found phone
      }	
    }
    

    Client Mailing Phone 1 Type

  • PDI Column: cln_mailing_phone_1
  • FHIR Element: Patient.extension
      column cln_mailing_phone_1_type{
      findResult phoneType = resource.telecom[1]use
      if phoneType.Found{
          found phoneType
      }
    }
    

    Client Mailing Phone 2 Type

  • PDI Column: cln_mailing_phone_2
  • FHIR Element: Patient.extension
      column cln_mailing_phone_2{
      findResult phone = resource.telecom[2]value
      if phone.Found{
          found phone
      }
    }
    

    Client Date Of Birth

  • PDI Column: cln_dob
  • FHIR Element: Patient.extension
      column cln_dob {
      note finds clients fhir id
    
      findResult birthDate = resource.birthDate
    
      if birthDate.Found{
    		
          found birthDate
      }
    }
    

    Client Vital Status

  • PDI Column: cln_vital_status
  • FHIR Element: Patient.extension
      column cln_vital_status {
    
      note VitalStatusID
    
      findResult vital = resource.deceasedBoolean
    
      if vital.Found{
    
          if vital.StringValue contains 'false'{
    
              found 'Alive'
          }
          found 'Deceased'
      }
    }
    

Birth Date Mapping

In this guide, we map the CSV column cln_dob to the FHIR Patient.birthDate field.