Class PD1

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class PD1 extends AbstractSegment

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

  • PD1-1: Living Dependency (IS) optional repeating
  • 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 Code (IS) optional
  • PD1-8: Organ Donor Code (IS) optional
  • PD1-9: Separate Bill (ID) optional
  • PD1-10: Duplicate Patient (CX) optional repeating
  • PD1-11: Publicity Code (CE) optional
  • PD1-12: Protection Indicator (ID) optional
  • PD1-13: Protection Indicator Effective Date (DT) optional
  • PD1-14: Place of Worship (XON) optional repeating
  • PD1-15: Advance Directive Code (CE) optional repeating
  • PD1-16: Immunization Registry Status (IS) optional
  • PD1-17: Immunization Registry Status Effective Date (DT) optional
  • PD1-18: Publicity Code Effective Date (DT) optional
  • PD1-19: Military Branch (IS) optional
  • PD1-20: Military Rank/Grade (IS) optional
  • PD1-21: Military Status (IS) optional
See Also:
  • Constructor Details

  • Method Details

    • getLivingDependency

      public IS[] getLivingDependency()
      Returns all repetitions of Living Dependency (PD1-1).
    • getPd11_LivingDependency

      Returns all repetitions of Living Dependency (PD1-1).
    • getLivingDependencyReps

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

      public IS getLivingDependency(int rep)
      Returns a specific repetition of PD1-1: "Living Dependency" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd11_LivingDependency

      public IS getPd11_LivingDependency(int rep)
      Returns a specific repetition of PD1-1: "Living Dependency" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd11_LivingDependencyReps

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

      public IS insertLivingDependency(int rep) throws HL7Exception
      Inserts a repetition of PD1-1: "Living Dependency" 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)
    • insertPd11_LivingDependency

      public IS insertPd11_LivingDependency(int rep) throws HL7Exception
      Inserts a repetition of PD1-1: "Living Dependency" 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)
    • removeLivingDependency

      public IS removeLivingDependency(int rep) throws HL7Exception
      Removes a repetition of PD1-1: "Living Dependency" 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)
    • removePd11_LivingDependency

      public IS removePd11_LivingDependency(int rep) throws HL7Exception
      Removes a repetition of PD1-1: "Living Dependency" 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)
    • 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
    • getLivingWillCode

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

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

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

      Returns PD1-8: "Organ Donor Code" - 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)
    • getPublicityCode

      public CE getPublicityCode()
      Returns PD1-11: "Publicity Code" - creates it if necessary
    • getPd111_PublicityCode

      Returns PD1-11: "Publicity Code" - 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
    • getProtectionIndicatorEffectiveDate

      Returns PD1-13: "Protection Indicator Effective Date" - creates it if necessary
    • getPd113_ProtectionIndicatorEffectiveDate

      Returns PD1-13: "Protection Indicator Effective Date" - creates it if necessary
    • getPlaceOfWorship

      public XON[] getPlaceOfWorship()
      Returns all repetitions of Place of Worship (PD1-14).
    • getPd114_PlaceOfWorship

      Returns all repetitions of Place of Worship (PD1-14).
    • getPlaceOfWorshipReps

      public int getPlaceOfWorshipReps()
      Returns a count of the current number of repetitions of Place of Worship (PD1-14). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getPlaceOfWorship

      public XON getPlaceOfWorship(int rep)
      Returns a specific repetition of PD1-14: "Place of Worship" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd114_PlaceOfWorship

      public XON getPd114_PlaceOfWorship(int rep)
      Returns a specific repetition of PD1-14: "Place of Worship" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd114_PlaceOfWorshipReps

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

      public XON insertPlaceOfWorship(int rep) throws HL7Exception
      Inserts a repetition of PD1-14: "Place of Worship" 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)
    • insertPd114_PlaceOfWorship

      public XON insertPd114_PlaceOfWorship(int rep) throws HL7Exception
      Inserts a repetition of PD1-14: "Place of Worship" 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)
    • removePlaceOfWorship

      public XON removePlaceOfWorship(int rep) throws HL7Exception
      Removes a repetition of PD1-14: "Place of Worship" 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)
    • removePd114_PlaceOfWorship

      public XON removePd114_PlaceOfWorship(int rep) throws HL7Exception
      Removes a repetition of PD1-14: "Place of Worship" 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)
    • getAdvanceDirectiveCode

      Returns all repetitions of Advance Directive Code (PD1-15).
    • getPd115_AdvanceDirectiveCode

      Returns all repetitions of Advance Directive Code (PD1-15).
    • getAdvanceDirectiveCodeReps

      Returns a count of the current number of repetitions of Advance Directive Code (PD1-15). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getAdvanceDirectiveCode

      public CE getAdvanceDirectiveCode(int rep)
      Returns a specific repetition of PD1-15: "Advance Directive Code" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd115_AdvanceDirectiveCode

      Returns a specific repetition of PD1-15: "Advance Directive Code" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPd115_AdvanceDirectiveCodeReps

      Returns a count of the current number of repetitions of Advance Directive Code (PD1-15). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertAdvanceDirectiveCode

      public CE insertAdvanceDirectiveCode(int rep) throws HL7Exception
      Inserts a repetition of PD1-15: "Advance Directive Code" 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)
    • insertPd115_AdvanceDirectiveCode

      Inserts a repetition of PD1-15: "Advance Directive Code" 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)
    • removeAdvanceDirectiveCode

      public CE removeAdvanceDirectiveCode(int rep) throws HL7Exception
      Removes a repetition of PD1-15: "Advance Directive Code" 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)
    • removePd115_AdvanceDirectiveCode

      Removes a repetition of PD1-15: "Advance Directive Code" 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)
    • getImmunizationRegistryStatus

      Returns PD1-16: "Immunization Registry Status" - creates it if necessary
    • getPd116_ImmunizationRegistryStatus

      Returns PD1-16: "Immunization Registry Status" - creates it if necessary
    • getImmunizationRegistryStatusEffectiveDate

      Returns PD1-17: "Immunization Registry Status Effective Date" - creates it if necessary
    • getPd117_ImmunizationRegistryStatusEffectiveDate

      Returns PD1-17: "Immunization Registry Status Effective Date" - creates it if necessary
    • getPublicityCodeEffectiveDate

      Returns PD1-18: "Publicity Code Effective Date" - creates it if necessary
    • getPd118_PublicityCodeEffectiveDate

      Returns PD1-18: "Publicity Code Effective Date" - creates it if necessary
    • getMilitaryBranch

      Returns PD1-19: "Military Branch" - creates it if necessary
    • getPd119_MilitaryBranch

      Returns PD1-19: "Military Branch" - creates it if necessary
    • getMilitaryRankGrade

      Returns PD1-20: "Military Rank/Grade" - creates it if necessary
    • getPd120_MilitaryRankGrade

      Returns PD1-20: "Military Rank/Grade" - creates it if necessary
    • getMilitaryStatus

      Returns PD1-21: "Military Status" - creates it if necessary
    • getPd121_MilitaryStatus

      Returns PD1-21: "Military Status" - creates it if necessary
    • createNewTypeWithoutReflection

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