CDA Examples
1.0.0 - active United States of America flag

CDA Examples, published by Health Level Seven. This guide is not an authorized publication; it is the continuous build for version 1.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/CDA-Examples/ and changes regularly. See the Directory of published versions

Example: Masked Social Security Number

Approval Status: Approved
Task Force Approval: 2019-09-05
SDWG Approval: 2019-10-10

This is an example of how to represent a social security number (SSN) that has been masked to show only the last four digits.

This file includes examples of the following templates:


<recordTarget xmlns="urn:hl7-org:v3">
  <patientRole>
    <!--  Example Social Security Number using the root for the Social Security Administion assigningAuthority.  -->
    <id root="2.16.840.1.113883.4.1" extension="414122222"
        assigningAuthorityName="US Social Security Administration"/>
    <!--  SSN provided, but masked to include only the last 4 characters.  -->
    <!--  Note: both examples are shows for comparison. It would not make sense to use both of these options in a real C-CDA Document.  -->
    <!--  When recording SSN in the extension dashes (-) are permitted but not required  -->
    <!--  Receiving systems may decide whether to store the last 4 or discard  -->
    <!--  an id with a nullFlavor of "MSK" SHALL NOT be used for matching or indexing  -->
    <id root="2.16.840.1.113883.4.1" nullFlavor="MSK"
        extension="***-**-2222" assigningAuthorityName="US Social Security Administration"/>
    <!--  US is "United States" from ISO 3166-1 Country Codes: 1.0.3166.1  -->
    <addr use="HP">
      <!--  HP is "primary home" from codeSystem 2.16.840.1.113883.5.1119  -->
      <streetAddressLine>1357 Amber Dr</streetAddressLine>
      <city>Beaverton</city>
      <state>OR</state>
      <postalCode>97006</postalCode>
      <country>US</country>
    </addr>
    <telecom value="tel:+1(555)-777-1234" use="MC"/>
    <telecom value="tel:+1(555)-723-1544" use="HP"/>
    <!--  HP is "primary home" from HL7 AddressUse 2.16.840.1.113883.5.1119  -->
    <patient>
      <name use="L">
        <given>Richard</given>
        <family>Maur</family>
        <suffix>jr</suffix>
      </name>
      <administrativeGenderCode displayName="Male"
                                codeSystemName="AdministrativeGender" codeSystem="2.16.840.1.113883.5.1" code="M"/>
      <!--  Date of birth need only be precise to the day  -->
      <birthTime value="19800801"/>
      <maritalStatusCode nullFlavor="NI"/>
      <religiousAffiliationCode
                                displayName="Christian (non-Catholic, non-specific)" codeSystemName="HL7 Religious Affiliation"
                                codeSystem="2.16.840.1.113883.5.1076" code="1013"/>
      <raceCode nullFlavor="UNK"/>
      <sdtc:sdtcRaceCode xmlns:sdtc="urn:hl7-org:sdtc" nullFlavor="UNK"/>
      <ethnicGroupCode nullFlavor="UNK"/>
      <languageCommunication>
        <languageCode code="en"/>
        <modeCode displayName="Expressed spoken"
                  codeSystemName="LanguageAbilityMode" codeSystem="2.16.840.1.113883.5.60" code="ESP"/>
        <preferenceInd value="true"/>
      </languageCommunication>
    </patient>
    <providerOrganization>
      <id root="2.16.840.1.113883.4.6" extension="99999999"/>
      <name>Community Health and Hospitals</name>
      <telecom value="tel:+1(555)-555-5000" use="WP"/>
      <addr>
        <streetAddressLine>1002 Healthcare Dr</streetAddressLine>
        <city>Portland</city>
        <state>OR</state>
        <postalCode>97266</postalCode>
        <country>US</country>
      </addr>
    </providerOrganization>
  </patientRole>
</recordTarget>