Class PV2

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class PV2 extends AbstractSegment

Represents an HL7 PV2 message segment (PATIENT VISIT - additional information). This segment has the following fields:

  • PV2-1: Prior Pending Location (CM_INTERNAL_LOCATION) optional
  • PV2-2: Accommodation Code (CE) optional
  • PV2-3: Admit Reason (CE) optional
  • PV2-4: Transfer Reason (CE) optional
  • PV2-5: Patient Valuables (ST) optional repeating
  • PV2-6: Patient Valuables Location (ST) optional
  • PV2-7: Visit User Code (ID) optional
  • PV2-8: Expected Admit Date (DT) optional
  • PV2-9: Expected Discharge Date (DT) optional
See Also:
  • Constructor Details

  • Method Details

    • getPriorPendingLocation

      Returns PV2-1: "Prior Pending Location" - creates it if necessary
    • getPv21_PriorPendingLocation

      Returns PV2-1: "Prior Pending Location" - creates it if necessary
    • getAccommodationCode

      Returns PV2-2: "Accommodation Code" - creates it if necessary
    • getPv22_AccommodationCode

      Returns PV2-2: "Accommodation Code" - creates it if necessary
    • getAdmitReason

      public CE getAdmitReason()
      Returns PV2-3: "Admit Reason" - creates it if necessary
    • getPv23_AdmitReason

      Returns PV2-3: "Admit Reason" - creates it if necessary
    • getTransferReason

      Returns PV2-4: "Transfer Reason" - creates it if necessary
    • getPv24_TransferReason

      Returns PV2-4: "Transfer Reason" - creates it if necessary
    • getPatientValuables

      public ST[] getPatientValuables()
      Returns all repetitions of Patient Valuables (PV2-5).
    • getPv25_PatientValuables

      Returns all repetitions of Patient Valuables (PV2-5).
    • getPatientValuablesReps

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

      public ST getPatientValuables(int rep)
      Returns a specific repetition of PV2-5: "Patient Valuables" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPv25_PatientValuables

      public ST getPv25_PatientValuables(int rep)
      Returns a specific repetition of PV2-5: "Patient Valuables" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getPv25_PatientValuablesReps

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

      public ST insertPatientValuables(int rep) throws HL7Exception
      Inserts a repetition of PV2-5: "Patient Valuables" 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)
    • insertPv25_PatientValuables

      public ST insertPv25_PatientValuables(int rep) throws HL7Exception
      Inserts a repetition of PV2-5: "Patient Valuables" 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)
    • removePatientValuables

      public ST removePatientValuables(int rep) throws HL7Exception
      Removes a repetition of PV2-5: "Patient Valuables" 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)
    • removePv25_PatientValuables

      public ST removePv25_PatientValuables(int rep) throws HL7Exception
      Removes a repetition of PV2-5: "Patient Valuables" 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)
    • getPatientValuablesLocation

      Returns PV2-6: "Patient Valuables Location" - creates it if necessary
    • getPv26_PatientValuablesLocation

      Returns PV2-6: "Patient Valuables Location" - creates it if necessary
    • getVisitUserCode

      public ID getVisitUserCode()
      Returns PV2-7: "Visit User Code" - creates it if necessary
    • getPv27_VisitUserCode

      Returns PV2-7: "Visit User Code" - creates it if necessary
    • getExpectedAdmitDate

      Returns PV2-8: "Expected Admit Date" - creates it if necessary
    • getPv28_ExpectedAdmitDate

      Returns PV2-8: "Expected Admit Date" - creates it if necessary
    • getExpectedDischargeDate

      Returns PV2-9: "Expected Discharge Date" - creates it if necessary
    • getPv29_ExpectedDischargeDate

      Returns PV2-9: "Expected Discharge Date" - creates it if necessary
    • createNewTypeWithoutReflection

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