All Implemented Interfaces:
Composite, Type, Visitable, Serializable

public class CP extends AbstractComposite

Represents an HL7 CP (Composite Price) data type. This type consists of the following components:

  • Price (MO)
  • Price Type (ID)
  • From Value (NM)
  • To Value (NM)
  • Range Units (CE)
  • Range Type (ID)
See Also:
  • Constructor Details

    • CP

      public CP(Message message)
      Creates a new CP type
  • Method Details

    • getComponents

      public Type[] getComponents()
      Returns an array containing the data elements.
    • getComponent

      public Type getComponent(int number) throws DataTypeException
      Returns an individual data component.
      Parameters:
      number - The component number (0-indexed)
      Throws:
      DataTypeException - if the given element number is out of range.
    • getPrice

      public MO getPrice()
      Returns Price (component 1). This is a convenience method that saves you from casting and handling an exception.
    • getCp1_Price

      public MO getCp1_Price()
      Returns Price (component 1). This is a convenience method that saves you from casting and handling an exception.
    • getPriceType

      public ID getPriceType()
      Returns Price Type (component 2). This is a convenience method that saves you from casting and handling an exception.
    • getCp2_PriceType

      public ID getCp2_PriceType()
      Returns Price Type (component 2). This is a convenience method that saves you from casting and handling an exception.
    • getFromValue

      public NM getFromValue()
      Returns From Value (component 3). This is a convenience method that saves you from casting and handling an exception.
    • getCp3_FromValue

      public NM getCp3_FromValue()
      Returns From Value (component 3). This is a convenience method that saves you from casting and handling an exception.
    • getToValue

      public NM getToValue()
      Returns To Value (component 4). This is a convenience method that saves you from casting and handling an exception.
    • getCp4_ToValue

      public NM getCp4_ToValue()
      Returns To Value (component 4). This is a convenience method that saves you from casting and handling an exception.
    • getRangeUnits

      public CE getRangeUnits()
      Returns Range Units (component 5). This is a convenience method that saves you from casting and handling an exception.
    • getCp5_RangeUnits

      Returns Range Units (component 5). This is a convenience method that saves you from casting and handling an exception.
    • getRangeType

      public ID getRangeType()
      Returns Range Type (component 6). This is a convenience method that saves you from casting and handling an exception.
    • getCp6_RangeType

      public ID getCp6_RangeType()
      Returns Range Type (component 6). This is a convenience method that saves you from casting and handling an exception.