CDA API Guide

cda.demographic.address

These functions add names (of people, places, clinics, etc.) to your CDA document:

add() [top]

Usage: cda.demographic.name.add{target=<{PARENT}>, given=<value>, family=<value>, nickname=<value>, prefix=<value>, element=<ROOT NAME>, use=<value>}

Beyond first and last names, names elements can include prefix and nickname components.

Returns: A parsed tree representing the populated XML element

Required parameters:

  • target: The parent tag under which you wish to add the new element
  • given: Given name, i.e., “Mary”
  • family: Family name, i.e., “Smith”

Optional parameters:

  • prefix: Prefix, i.e., Dr or Mrs
  • nickname: Nickname
  • element: The specific name of the tag you are creating (default element = “name”)
  • use: Identifies the type of name

Example:

cda.demographic.name.add{target=P, given='Isabella', nickname='Isa', family='Jones', use=cda.code.nameUses.Legal}

Example Result:

<name use="L">
   <given>Isabella</given>
   <nickname>Isa</nickaname>
   <family>Jones</family>
</name>

simple.add() [top]

Usage: cda.demographic.name.simple.add{target=<{PARENT}>, name=<value>}

On occasion, a name can simply be a single string of text.

Returns: A parsed tree representing the populated XML element

Required parameters:

  • target: The parent tag under which you wish to add the new element
  • name: The name itself, as a string value

Example:

cda.demographic.name.simple.add{target=O, name='Community Health and Hospitals'}

Example Result:

<name>Community Health and Hospitals</name>

Leave A Comment?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.