Class PD1

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class PD1 extends AbstractSegment

Represents an HL7 PD1 message segment (Patient Demographic). This segment has the following fields:

  • PD1-1: Living Dependency (IS) optional
  • PD1-2: Living Arrangement (IS) optional
  • PD1-3: Patient Primary Facility (XON) optional repeating
  • PD1-4: Patient Primary Care Provider Name & ID No. (XCN) optional repeating
  • PD1-5: Student Indicator (IS) optional
  • PD1-6: Handicap (IS) optional
  • PD1-7: Living Will (IS) optional
  • PD1-8: Organ Donor (IS) optional
  • PD1-9: Separate Bill (ID) optional
  • PD1-10: Duplicate Patient (CX) optional repeating
  • PD1-11: Publicity Indicator (CE) optional
  • PD1-12: Protection Indicator (ID) optional
See Also:
  • Constructor Details

  • Method Details

    • getLivingDependency

      Returns PD1-1: "Living Dependency" - creates it if necessary
    • getPd11_LivingDependency

      Returns PD1-1: "Living Dependency" - creates it if necessary
    • getLivingArrangement

      Returns PD1-2: "Living Arrangement" - creates it if necessary
    • getPd12_LivingArrangement

      Returns PD1-2: "Living Arrangement" - creates it if necessary
    • getPatientPrimaryFacility

      Returns all repetitions of Patient Primary Facility (PD1-3).
    • getPd13_PatientPrimaryFacility

      Returns all repetitions of Patient Primary Facility (PD1-3).
    • getPatientPrimaryFacilityReps

      Returns a count of the current number of repetitions of Patient Primary Facility (PD1-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getPatientPrimaryFacility

      public XON getPatientPrimaryFacility(int rep)
      Returns a specific repetition of PD1-3: "Patient Primary Facility" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd13_PatientPrimaryFacility

      Returns a specific repetition of PD1-3: "Patient Primary Facility" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd13_PatientPrimaryFacilityReps

      Returns a count of the current number of repetitions of Patient Primary Facility (PD1-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertPatientPrimaryFacility

      Inserts a repetition of PD1-3: "Patient Primary Facility" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertPd13_PatientPrimaryFacility

      Inserts a repetition of PD1-3: "Patient Primary Facility" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removePatientPrimaryFacility

      Removes a repetition of PD1-3: "Patient Primary Facility" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removePd13_PatientPrimaryFacility

      Removes a repetition of PD1-3: "Patient Primary Facility" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getPatientPrimaryCareProviderNameIDNo

      Returns all repetitions of Patient Primary Care Provider Name & ID No. (PD1-4).
    • getPd14_PatientPrimaryCareProviderNameIDNo

      Returns all repetitions of Patient Primary Care Provider Name & ID No. (PD1-4).
    • getPatientPrimaryCareProviderNameIDNoReps

      Returns a count of the current number of repetitions of Patient Primary Care Provider Name & ID No. (PD1-4). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getPatientPrimaryCareProviderNameIDNo

      Returns a specific repetition of PD1-4: "Patient Primary Care Provider Name & ID No." - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd14_PatientPrimaryCareProviderNameIDNo

      Returns a specific repetition of PD1-4: "Patient Primary Care Provider Name & ID No." - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd14_PatientPrimaryCareProviderNameIDNoReps

      Returns a count of the current number of repetitions of Patient Primary Care Provider Name & ID No. (PD1-4). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertPatientPrimaryCareProviderNameIDNo

      Inserts a repetition of PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertPd14_PatientPrimaryCareProviderNameIDNo

      Inserts a repetition of PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removePatientPrimaryCareProviderNameIDNo

      Removes a repetition of PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removePd14_PatientPrimaryCareProviderNameIDNo

      Removes a repetition of PD1-4: "Patient Primary Care Provider Name & ID No." at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getStudentIndicator

      Returns PD1-5: "Student Indicator" - creates it if necessary
    • getPd15_StudentIndicator

      Returns PD1-5: "Student Indicator" - creates it if necessary
    • getHandicap

      public IS getHandicap()
      Returns PD1-6: "Handicap" - creates it if necessary
    • getPd16_Handicap

      public IS getPd16_Handicap()
      Returns PD1-6: "Handicap" - creates it if necessary
    • getLivingWill

      public IS getLivingWill()
      Returns PD1-7: "Living Will" - creates it if necessary
    • getPd17_LivingWill

      Returns PD1-7: "Living Will" - creates it if necessary
    • getOrganDonor

      public IS getOrganDonor()
      Returns PD1-8: "Organ Donor" - creates it if necessary
    • getPd18_OrganDonor

      Returns PD1-8: "Organ Donor" - creates it if necessary
    • getSeparateBill

      public ID getSeparateBill()
      Returns PD1-9: "Separate Bill" - creates it if necessary
    • getPd19_SeparateBill

      Returns PD1-9: "Separate Bill" - creates it if necessary
    • getDuplicatePatient

      public CX[] getDuplicatePatient()
      Returns all repetitions of Duplicate Patient (PD1-10).
    • getPd110_DuplicatePatient

      Returns all repetitions of Duplicate Patient (PD1-10).
    • getDuplicatePatientReps

      Returns a count of the current number of repetitions of Duplicate Patient (PD1-10). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getDuplicatePatient

      public CX getDuplicatePatient(int rep)
      Returns a specific repetition of PD1-10: "Duplicate Patient" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd110_DuplicatePatient

      public CX getPd110_DuplicatePatient(int rep)
      Returns a specific repetition of PD1-10: "Duplicate Patient" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd110_DuplicatePatientReps

      Returns a count of the current number of repetitions of Duplicate Patient (PD1-10). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertDuplicatePatient

      public CX insertDuplicatePatient(int rep) throws HL7Exception
      Inserts a repetition of PD1-10: "Duplicate Patient" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertPd110_DuplicatePatient

      public CX insertPd110_DuplicatePatient(int rep) throws HL7Exception
      Inserts a repetition of PD1-10: "Duplicate Patient" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeDuplicatePatient

      public CX removeDuplicatePatient(int rep) throws HL7Exception
      Removes a repetition of PD1-10: "Duplicate Patient" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removePd110_DuplicatePatient

      public CX removePd110_DuplicatePatient(int rep) throws HL7Exception
      Removes a repetition of PD1-10: "Duplicate Patient" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getPublicityIndicator

      Returns PD1-11: "Publicity Indicator" - creates it if necessary
    • getPd111_PublicityIndicator

      Returns PD1-11: "Publicity Indicator" - creates it if necessary
    • getProtectionIndicator

      Returns PD1-12: "Protection Indicator" - creates it if necessary
    • getPd112_ProtectionIndicator

      Returns PD1-12: "Protection Indicator" - creates it if necessary
    • createNewTypeWithoutReflection

      protected Type createNewTypeWithoutReflection(int field)
      Overrides:
      createNewTypeWithoutReflection in class AbstractSegment