CDA API Guide

cda.dose

This function adds dosage information to your CDA document:


add() [top]

Usage: cda.dose.add{target=<{PARENT}>, element=<ELEMENT>, numerator=<NUMERATOR>, denominator=<DENOMINATOR>}

Add dosage information to your CDA document.

Note: Both the numerator and denominator are optional fields. If they are not provided, they are replaced by the nullFlavor “UNK” (meaning “unknown”).

Returns: A parsed tree representing the populated XML element

Required parameters:

  • target:The parent tag under which you wish to add the new element
  • element: The specific name of the tag you are creating

Optional parameters:

  • numerator: The numerator portion of the dose value
  • denominator: The denominator portion of the dose value

Example:

cda.dose.add{target={PARENT}, element='maxDoseQuantity', numerator='12', denominator='35'}

Example Result:

<maxDoseQuantity>
    <numerator value='12'></numerator>
    <denominator value='35'></denominator>
</maxDoseQuantity>