Implementation Guide
23.1.0 - R4 APIs

Publish Box goes here

Resource Profile: AthenaPatient - Mappings

Active as of 2022-03-01

Mappings for the athena-patient-profile resource profile.

Mappings for athenaFlow (http://unknown.org/athenaFlow)

AthenaPatient
PatientFHIRR4_PATIENTVIEW
   idMakeId(%RESOURCEID%)
   meta
      lastUpdated%DB_UPDATED_DATE%
      securityCheckSensitive(%SENSITIVECHART%)
   extension
   extension (mothersMaidenName)
      value[x]%MOTHERSMAIDEN%
   extension (RESPPROVID)
      value[x]MakeReference("USR",%RESPPROVID%,"Practitioner")
   extension (REFDOCID)
      value[x]MakeReference("USR",%REFDOCID%,"Practitioner")
   extension (preferredContact)
      value[x]MapString(%PREFERREDCONTACT%, "PREFCONTACT")
   extension (BIRTHTIME)
      value[x]asBirthTimeType(%DATEOFBIRTH%, %TIMEOFBIRTH%)
   extension (patientAsGuarantor)
   extension (genderIdentity)
      value[x]MakeConceptUsingMedlist(%GENDERIDENTITY%,%GENDERIDENTITYTEXT%,"https://docs.mydata.athenahealth.com/fhir-r4/athenaFlex/genderIdentity")
   extension (sexualOrientation)
      value[x]MakeConceptUsingMedlist(%SEXUALORIENTATION%,%SEXUALORIENTATIONTEXT%,"https://docs.mydata.athenahealth.com/fhir-r4/athenaFlex/sexualOrientation")
   extension (USCORERACE)MakeCodingExtension(%RACE%,"RACE","http://hl7.org/fhir/us/core/StructureDefinition/us-core-race")
   extension (USCOREETHNICITY)MakeCodingExtension(%ETHNICITY%,"ETHNICITY","http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity")
   extension (USCOREBIRTHSEX)MakeCodeExtension(%SEX%, "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex")
   identifier
   identifier
      systemgetSiteIdSystem("PatientId")
      value%PATIENTID%
   identifier
      value%SOCSECNO%
   identifier
      systemgetSiteIdSystem("MRN")
      value%MEDRECNO%
   activeEquals("A",%PSTATUS%)
   name
   name (Name)MakeSearchName(%FIRSTNAME%,%MIDDLENAME%,%LASTNAME%,%TITLE%,%ENTITLEMENTS%)
      family%LASTNAME%
      given (First Name)%FIRSTNAME%
      given (Middle Name)%MIDDLENAME%
      prefix%TITLE%
      suffix%ENTITLEMENTS%
   name (PreviousName)
      family%PREVIOUSLASTNAME%
      given (Previous First Name)%PREVIOUSFIRSTNAME%
      given (Previous Middle Name)%PREVIOUSMIDDLENAME%
      suffix%PREVIOUSENTITLEMENTS%
      periodMakePeriod(%PreviousNameStartDate%,%PreviousNameEndDate%)
   name (Nickname)
      use"nickname"
      given%NICKNAME%
   telecom
   telecom (Work)
      value%WORKPHONE%
   telecom (Home)
      value%ALTPHONE%
   telecom (Mobile)
      value%CELLPHONE%
   telecom (Fax)
      value%FAXPHONE%
   telecom (Pager)
      value%PAGERPHONE%
   telecom (Email)
      value%EMAIL%
   genderMapCode(%SEX%,"GENDER")
   birthDate%DATEOFBIRTH%
   deceased[x]IfNull(%DATEOFDEATH%).Then(Equals("X",%PSTATUS%)) | IfSet(%DATEOFDEATH%).Then(%DATEOFDEATH%)
   address
   address (Current Address)MakeSearchAddress(%ADDRESS1%,%ADDRESS2%,%CITY%,%STATE%,%ZIP%,%COUNTRY%)
      line%ADDRESS1%
      line%ADDRESS2%
      cityMakeSearchAddressCity(%CITY%)
      stateMakeSearchAddressState(%STATE%)
      postalCodeMakeSearchAddressZip(%ZIP%)
      countryMakeSearchAddressCountry(%COUNTRY%)
   address (Previous Address)MakePreviousAddressList(%PREVIOUSADDRESSLIST%)
   maritalStatusMapConcept(%MARITALSTATUS%,"MARITALSTATUS")
   photoMakeBinary("Photo",%PHOTO_ID%)
   communication
      languageMakeConcept(%LANGCODE%,"urn:ietf:bcp:47",%PREFLANG%)
      preferredtrue
   generalPractitionerMakeReference("USR",%PRICAREID%,"Practitioner")
   managingOrganizationMakeReference("LOCREG",%HOMELOCATION%,"Organization")

Mappings for athenaPractice (http://unknown.org/athenaPractice)

AthenaPatient
PatientFHIRR4_PATIENTVIEW
   idMakeId(%RESOURCEID%)
   meta
      lastUpdated%DB_UPDATED_DATE%
      securityCheckSensitive(%SENSITIVECHART%)
   extension
   extension (mothersMaidenName)
      value[x]%MOTHERSMAIDEN%
   extension (RESPPROVID)
      value[x]MakeReference("USR",%RESPPROVID%,"Practitioner")
   extension (REFDOCID)
      value[x]MakeReference("USR",%REFDOCID%,"Practitioner")
   extension (preferredContact)
      value[x]%PREFERREDCONTACT%
   extension (BIRTHTIME)
      value[x]asBirthTimeType(%DATEOFBIRTH%, %TIMEOFBIRTH%)
   extension (patientAsGuarantor)
      value[x]isPatientAsGuarantor(%PATIENTASGUARANTOR%)
   extension (genderIdentity)
      value[x]MakeConceptUsingMedlist(%GENDERIDENTITY%,%GENDERIDENTITYTEXT%,"https://docs.mydata.athenahealth.com/fhir-r4/athenaFlex/genderIdentity")
   extension (sexualOrientation)
      value[x]MakeConceptUsingMedlist(%SEXUALORIENTATION%,%SEXUALORIENTATIONTEXT%,"https://docs.mydata.athenahealth.com/fhir-r4/athenaFlex/sexualOrientation")
   extension (guarantorDetails)
      value[x]MakeReference("Guarantor",%GUARANTORID%,"RelatedPerson")
   extension (USCORERACE)MakeCodingExtension(%RACE%,"RACE","http://hl7.org/fhir/us/core/StructureDefinition/us-core-race")
   extension (USCOREETHNICITY)MakeCodingExtension(%ETHNICITY%,"ETHNICITY","http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity")
   extension (USCOREBIRTHSEX)MakeCodeExtension(%SEX%, "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex")
   identifier
   identifier
      systemgetSiteIdSystem("PatientId")
      value%PATIENTID%
   identifier
      value%SOCSECNO%
   identifier
      systemgetSiteIdSystem("MRN")
      value%MEDRECNO%
   activeEquals("A",%PSTATUS%)
   name
   name (Name)MakeSearchName(%FIRSTNAME%,%MIDDLENAME%,%LASTNAME%,%TITLE%,%ENTITLEMENTS%)
      family%LASTNAME%
      given (First Name)%FIRSTNAME%
      given (Middle Name)%MIDDLENAME%
      prefix%TITLE%
      suffix%ENTITLEMENTS%
   name (PreviousName)
      family%PREVIOUSLASTNAME%
      given (Previous First Name)%PREVIOUSFIRSTNAME%
      given (Previous Middle Name)%PREVIOUSMIDDLENAME%
      suffix%PREVIOUSENTITLEMENTS%
      periodMakePeriod(%PreviousNameStartDate%,%PreviousNameEndDate%)
   name (Nickname)
      use"nickname"
      given%NICKNAME%
   telecom
   telecom (Work)
      value%WORKPHONE%
   telecom (Home)
      value%ALTPHONE%
   telecom (Mobile)
      value%CELLPHONE%
   telecom (Fax)
      value%FAXPHONE%
   telecom (Pager)
      value%PAGERPHONE%
   telecom (Email)
      value%EMAIL%
   genderMapCode(%SEX%,"GENDER")
   birthDate%DATEOFBIRTH%
   deceased[x]IfNull(%DATEOFDEATH%).Then(Equals("X",%PSTATUS%)) | IfSet(%DATEOFDEATH%).Then(%DATEOFDEATH%)
   address
   address (Current Address)MakeSearchAddress(%ADDRESS1%,%ADDRESS2%,%CITY%,%STATE%,%ZIP%,%COUNTRY%)
      line%ADDRESS1%
      line%ADDRESS2%
      cityMakeSearchAddressCity(%CITY%)
      stateMakeSearchAddressState(%STATE%)
      postalCodeMakeSearchAddressZip(%ZIP%)
      countryMakeSearchAddressCountry(%COUNTRY%)
   address (Previous Address)MakePreviousAddressList(%PREVIOUSADDRESSLIST%)
   maritalStatusMapConcept(%MARITALSTATUS%,"MARITALSTATUS")
   photoMakeBinary("Photo",%PHOTO_ID%)
   communication
      languageMakeConcept(%LANGCODE%,"urn:ietf:bcp:47",%PREFLANG%)
      preferredtrue
   generalPractitionerMakeReference("USR",%PRICAREID%,"Practitioner")
   managingOrganizationMakeReference("LOCREG",%HOMELOCATION%,"Organization")

Mappings for RIM Mapping (http://hl7.org/v3)

AthenaPatient
PatientEntity. Role, or Act, Patient[classCode=PAT]
   meta
      idn/a
      extensionn/a
   textAct.text?
   containedN/A
   extension
   extension (mothersMaidenName)Role relationship to entity with maiden name (?)
      idn/a
      urlN/A
      value[x]N/A
   extension (RESPPROVID)
      idn/a
      extensionn/a
      urlN/A
      value[x]N/A
   extension (REFDOCID)
      idn/a
      extensionn/a
      urlN/A
      value[x]N/A
   extension (preferredContact)
      idn/a
      extensionn/a
      urlN/A
      value[x]N/A
   extension (BIRTHTIME)
      idn/a
      extensionn/a
      urlN/A
      value[x]N/A
   extension (patientAsGuarantor)
      idn/a
      extensionn/a
      urlN/A
      value[x]N/A
   extension (genderIdentity)
      idn/a
      extensionn/a
      urlN/A
      value[x]N/A
   extension (sexualOrientation)
      idn/a
      extensionn/a
      urlN/A
      value[x]N/A
   extension (guarantorDetails)
      idn/a
      extensionn/a
      urlN/A
      value[x]N/A
   extension (USCOREBIRTHSEX)player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender
   modifierExtensionN/A
   identifierid
   identifierid
      idn/a
      extensionn/a
      useRole.code or implied by context
      typeRole.code or implied by context
         idn/a
         extensionn/a
         codingunion(., ./translation)
            idn/a
            extensionn/a
            system./codeSystem
            version./codeSystemVersion
            code./code
            displayCV.displayName
            userSelectedCD.codingRationale
         text./originalText[mediaType/code="text/plain"]/data
      systemII.root or Role.id.root
      valueII.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)
      periodRole.effectiveTime or implied by context
      assignerII.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper
   identifierid
      idn/a
      extensionn/a
      useRole.code or implied by context
      typeRole.code or implied by context
         idn/a
         extensionn/a
         codingunion(., ./translation)
            idn/a
            extensionn/a
            system./codeSystem
            version./codeSystemVersion
            code./code
            displayCV.displayName
            userSelectedCD.codingRationale
         text./originalText[mediaType/code="text/plain"]/data
      systemII.root or Role.id.root
      valueII.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)
      periodRole.effectiveTime or implied by context
      assignerII.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper
   identifierid
      idn/a
      extensionn/a
      useRole.code or implied by context
      typeRole.code or implied by context
         idn/a
         extensionn/a
         codingunion(., ./translation)
            idn/a
            extensionn/a
            system./codeSystem
            version./codeSystemVersion
            code./code
            displayCV.displayName
            userSelectedCD.codingRationale
         text./originalText[mediaType/code="text/plain"]/data
      systemII.root or Role.id.root
      valueII.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)
      periodRole.effectiveTime or implied by context
      assignerII.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper
   identifierid
   activestatusCode
   namename
   name (Name)name
      idn/a
      extensionn/a
      useunique(./use)
      text./formatted
      family./part[partType = FAM]
      given./part[partType = GIV]
      given (First Name)./part[partType = GIV]
      given (Middle Name)./part[partType = GIV]
      prefix./part[partType = PFX]
      suffix./part[partType = SFX]
      period./usablePeriod[type="IVL<TS>"]
   name (PreviousName)name
      idn/a
      extensionn/a
      useunique(./use)
      text./formatted
      family./part[partType = FAM]
      given./part[partType = GIV]
      given (Previous First Name)./part[partType = GIV]
      given (Previous Middle Name)./part[partType = GIV]
      prefix./part[partType = PFX]
      suffix./part[partType = SFX]
      period./usablePeriod[type="IVL<TS>"]
   name (Nickname)name
      idn/a
      extensionn/a
      useunique(./use)
      text./formatted
      family./part[partType = FAM]
      given./part[partType = GIV]
      prefix./part[partType = PFX]
      suffix./part[partType = SFX]
      period./usablePeriod[type="IVL<TS>"]
   telecomtelecom
   telecom (Work)telecom
      idn/a
      extensionn/a
      system./scheme
      value./url
      useunique(./use)
      rankn/a
      period./usablePeriod[type="IVL<TS>"]
   telecom (Home)telecom
      idn/a
      extensionn/a
      system./scheme
      value./url
      useunique(./use)
      rankn/a
      period./usablePeriod[type="IVL<TS>"]
   telecom (Mobile)telecom
      idn/a
      extensionn/a
      system./scheme
      value./url
      useunique(./use)
      rankn/a
      period./usablePeriod[type="IVL<TS>"]
   telecom (Fax)telecom
      idn/a
      extensionn/a
      system./scheme
      value./url
      rankn/a
      period./usablePeriod[type="IVL<TS>"]
   telecom (Pager)telecom
      idn/a
      extensionn/a
      system./scheme
      value./url
      useunique(./use)
      rankn/a
      period./usablePeriod[type="IVL<TS>"]
   telecom (Email)telecom
      idn/a
      extensionn/a
      system./scheme
      value./url
      useunique(./use)
      rankn/a
      period./usablePeriod[type="IVL<TS>"]
   genderplayer[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender
   birthDateplayer[classCode=PSN|ANM and determinerCode=INSTANCE]/birthTime
   deceased[x]player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedTime
   addressaddr
   address (Current Address)addr
      idn/a
      extensionn/a
      useunique(./use)
      typeunique(./use)
      text./formatted
      lineAD.part[parttype = AL]
      lineAD.part[parttype = AL]
      lineAD.part[parttype = AL]
      cityAD.part[parttype = CTY]
      districtAD.part[parttype = CNT | CPA]
      stateAD.part[parttype = STA]
      postalCodeAD.part[parttype = ZIP]
      countryAD.part[parttype = CNT]
      period./usablePeriod[type="IVL<TS>"]
   address (Previous Address)addr
   maritalStatusplayer[classCode=PSN]/maritalStatusCode
   multipleBirth[x]player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthOrderNumber
   photoplayer[classCode=PSN|ANM and determinerCode=INSTANCE]/desc
   contactplayer[classCode=PSN|ANM and determinerCode=INSTANCE]/scopedRole[classCode=CON]
      idn/a
      extensionn/a
      modifierExtensionN/A
      relationshipcode
      namename
      telecomtelecom
      addressaddr
      genderplayer[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender
      organizationscoper
      periodeffectiveTime
   communicationLanguageCommunication
      idn/a
      extensionn/a
      modifierExtensionN/A
      languageplayer[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code
      preferredpreferenceInd
   generalPractitionersubjectOf.CareEvent.performer.AssignedEntity
   managingOrganizationscoper
   linkoutboundLink
      idn/a
      extensionn/a
      modifierExtensionN/A
      otherid
      typetypeCode

Mappings for CDA (R2) (http://hl7.org/v3/cda)

AthenaPatient
PatientClinicalDocument.recordTarget.patientRole
   identifier.id
   identifier.id
   identifier.id
   identifier.id
   identifier.id
   activen/a
   name.patient.name
   name (Name).patient.name
   name (PreviousName).patient.name
   name (Nickname).patient.name
   telecom.telecom
   telecom (Work).telecom
   telecom (Home).telecom
   telecom (Mobile).telecom
   telecom (Fax).telecom
   telecom (Pager).telecom
   telecom (Email).telecom
   gender.patient.administrativeGenderCode
   birthDate.patient.birthTime
   deceased[x]n/a
   address.addr
   address (Current Address).addr
   address (Previous Address).addr
   maritalStatus.patient.maritalStatusCode
   multipleBirth[x]n/a
   photon/a
   contactn/a
      relationshipn/a
      namen/a
      telecomn/a
      addressn/a
      gendern/a
      organizationn/a
      periodn/a
   communicationpatient.languageCommunication
      language.languageCode
      preferred.preferenceInd
   generalPractitionern/a
   managingOrganization.providerOrganization
   linkn/a
      othern/a
      typen/a

Mappings for FiveWs Pattern Mapping (http://hl7.org/fhir/fivews)

AthenaPatient
Patient
   identifierFiveWs.identifier
   identifierFiveWs.identifier
   identifierFiveWs.identifier
   identifierFiveWs.identifier
   identifierFiveWs.identifier
   activeFiveWs.status

Mappings for HL7 v2 Mapping (http://hl7.org/v2)

AthenaPatient
Patient
   extension (mothersMaidenName)PID-6
   identifierPID-3
   identifierPID-3
      useN/A
      typeCX.5
         codingC*E.1-8, C*E.10-22
            systemC*E.3
            versionC*E.7
            codeC*E.1
            displayC*E.2 - but note this is not well followed
            userSelectedSometimes implied by being first
         textC*E.9. But note many systems use C*E.2 for this
      systemCX.4 / EI-2-4
      valueCX.1 / EI.1
      periodCX.7 + CX.8
      assignerCX.4 / (CX.4,CX.9,CX.10)
   identifierPID-3
      useN/A
      typeCX.5
         codingC*E.1-8, C*E.10-22
            systemC*E.3
            versionC*E.7
            codeC*E.1
            displayC*E.2 - but note this is not well followed
            userSelectedSometimes implied by being first
         textC*E.9. But note many systems use C*E.2 for this
      systemCX.4 / EI-2-4
      valueCX.1 / EI.1
      periodCX.7 + CX.8
      assignerCX.4 / (CX.4,CX.9,CX.10)
   identifierPID-3
      useN/A
      typeCX.5
         codingC*E.1-8, C*E.10-22
            systemC*E.3
            versionC*E.7
            codeC*E.1
            displayC*E.2 - but note this is not well followed
            userSelectedSometimes implied by being first
         textC*E.9. But note many systems use C*E.2 for this
      systemCX.4 / EI-2-4
      valueCX.1 / EI.1
      periodCX.7 + CX.8
      assignerCX.4 / (CX.4,CX.9,CX.10)
   identifierPID-3
   namePID-5, PID-9
   name (Name)PID-5, PID-9
      useXPN.7, but often indicated by which field contains the name
      textimplied by XPN.11
      familyXPN.1/FN.1
      givenXPN.2 + XPN.3
      given (First Name)XPN.2 + XPN.3
      given (Middle Name)XPN.2 + XPN.3
      prefixXPN.5
      suffixXPN/4
      periodXPN.13 + XPN.14
   name (PreviousName)PID-5, PID-9
      useXPN.7, but often indicated by which field contains the name
      textimplied by XPN.11
      familyXPN.1/FN.1
      givenXPN.2 + XPN.3
      given (Previous First Name)XPN.2 + XPN.3
      given (Previous Middle Name)XPN.2 + XPN.3
      prefixXPN.5
      suffixXPN/4
      periodXPN.13 + XPN.14
   name (Nickname)PID-5, PID-9
      useXPN.7, but often indicated by which field contains the name
      textimplied by XPN.11
      familyXPN.1/FN.1
      givenXPN.2 + XPN.3
      prefixXPN.5
      suffixXPN/4
      periodXPN.13 + XPN.14
   telecomPID-13, PID-14, PID-40
   telecom (Work)PID-13, PID-14, PID-40
      systemXTN.3
      valueXTN.1 (or XTN.12)
      useXTN.2 - but often indicated by field
      rankn/a
      periodN/A
   telecom (Home)PID-13, PID-14, PID-40
      systemXTN.3
      valueXTN.1 (or XTN.12)
      useXTN.2 - but often indicated by field
      rankn/a
      periodN/A
   telecom (Mobile)PID-13, PID-14, PID-40
      systemXTN.3
      valueXTN.1 (or XTN.12)
      useXTN.2 - but often indicated by field
      rankn/a
      periodN/A
   telecom (Fax)PID-13, PID-14, PID-40
      systemXTN.3
      valueXTN.1 (or XTN.12)
      rankn/a
      periodN/A
   telecom (Pager)PID-13, PID-14, PID-40
      systemXTN.3
      valueXTN.1 (or XTN.12)
      useXTN.2 - but often indicated by field
      rankn/a
      periodN/A
   telecom (Email)PID-13, PID-14, PID-40
      systemXTN.3
      valueXTN.1 (or XTN.12)
      useXTN.2 - but often indicated by field
      rankn/a
      periodN/A
   genderPID-8
   birthDatePID-7
   deceased[x]PID-30 (bool) and PID-29 (datetime)
   addressPID-11
   address (Current Address)PID-11
      useXAD.7
      typeXAD.18
      textXAD.1 + XAD.2 + XAD.3 + XAD.4 + XAD.5 + XAD.6
      lineXAD.1 + XAD.2 (note: XAD.1 and XAD.2 have different meanings for a company address than for a person address)
      lineXAD.1 + XAD.2 (note: XAD.1 and XAD.2 have different meanings for a company address than for a person address)
      lineXAD.1 + XAD.2 (note: XAD.1 and XAD.2 have different meanings for a company address than for a person address)
      cityXAD.3
      districtXAD.9
      stateXAD.4
      postalCodeXAD.5
      countryXAD.6
      periodXAD.12 / XAD.13 + XAD.14
   address (Previous Address)PID-11
   maritalStatusPID-16
   multipleBirth[x]PID-24 (bool), PID-25 (integer)
   photoOBX-5 - needs a profile
   contact
      relationshipNK1-7, NK1-3
      nameNK1-2
      telecomNK1-5, NK1-6, NK1-40
      addressNK1-4
      genderNK1-15
      organizationNK1-13, NK1-30, NK1-31, NK1-32, NK1-41
   communication
      languagePID-15, LAN-2
      preferredPID-15
   generalPractitionerPD1-4
   link
      otherPID-3, MRG-1

Mappings for LOINC code for the element (http://loinc.org)

AthenaPatient
Patient
   birthDate21112-8