au.gov.nehta.vendorlibrary.mdm.segments
Class PID.Builder

java.lang.Object
  extended by au.gov.nehta.vendorlibrary.mdm.segments.PID.Builder
Enclosing class:
PID

public static final class PID.Builder
extends java.lang.Object

PID.Builder Build class used to construct and validate a PID object.


Constructor Summary
PID.Builder()
           
 
Method Summary
 PID build()
          Build PID and validate necessary fields.
 PID.Builder dateTimeOfBirth(java.util.Date value)
          Set patient date/time of birth.
 PID.Builder patientAddress(XAD value)
          Set patient address.
 PID.Builder patientIdentifiers(java.util.List<CX> values)
          Set patient identifiers.
 PID.Builder patientName(XPN value)
          Set patient name.
 PID.Builder sex(Sex value)
          Set patient sex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PID.Builder

public PID.Builder()
Method Detail

patientIdentifiers

public PID.Builder patientIdentifiers(java.util.List<CX> values)
Set patient identifiers.

Parameters:
values - List of patient identifiers (not null).
Returns:
PID.Builder

patientName

public PID.Builder patientName(XPN value)
Set patient name.

Parameters:
value - Patient name (not null).
Returns:
PID.Builder

dateTimeOfBirth

public PID.Builder dateTimeOfBirth(java.util.Date value)
Set patient date/time of birth.

Parameters:
value - Patient date/time of birth (not null).
Returns:
PID.Builder

patientAddress

public PID.Builder patientAddress(XAD value)
Set patient address.

Parameters:
value - Patient address (not null).
Returns:
PID.Builder

sex

public PID.Builder sex(Sex value)
Set patient sex.

Parameters:
value - Patient sex (not null).
Returns:
PID.Builder

build

public PID build()
          throws MDMValidationException
Build PID and validate necessary fields.

Returns:
PID
Throws:
MDMValidationException - Thrown when validation of the PID contents fails.