org.vmdb.hl7
Class PIDSegment

java.lang.Object
  |
  +--org.vmdb.hl7.HL7Object
        |
        +--org.vmdb.hl7.HL7Segment
              |
              +--org.vmdb.hl7.PIDSegment

public class PIDSegment
extends HL7Segment

Patient Identification (PID) Segment.

Description: HL7 Network Connectivity For VMDB.

Copyright: Copyright (c) 2002-2003.

Company: Veterinary Medical Database (VMDB).

The PID segment is used as the primary means of communicating information concerning the veterinary patient identification. This segment is required for all VMDB reporting messages. For VMDB usage, only one PID segment per message is allowed.

See HL7 Standard Chapter 3 for additional details.


Constructor Summary
PIDSegment()
          Construct an empty patient identification segment.
PIDSegment(HL7SegmentContainer msgParent)
          Construct an empty patient identification segment, setting its containing message object.
 
Method Summary
 void addPatientId(java.lang.String sId, java.lang.String sAssigningAuthority)
          Set the sending facility.
 CEElement getBreed()
          Get the breed code as the complete CEElement
 java.lang.String getBreedCode()
          Get just the breed code value.
 java.lang.String getBreedCodingSystem()
          Get just the coding system of the breed code value.
 java.lang.String getBreedText()
          Get just the text of the breed code value.
 java.lang.String getDateOfBirth()
          Get birthdate string
 boolean getMultipleBirth()
          Get birthdate string
 XADElement getPatientAddress()
          Get the full patient address as XADElement
 java.lang.String getPatientCountry()
          Get just the Country string from address
 XPNElement getPatientName()
          Get the full patient name as XPNElement
 java.lang.String getPatientNameString()
          Get just the name string stored in family name.
 java.lang.String getPatientZipcode()
          Get just the zipcode string from address
 java.lang.String getSex()
          Get birthdate string
 CEElement getSpecies()
          Get the species code as the complete CEElement
 java.lang.String getSpeciesCode()
          Get just the universal id of the sending facility, the VMDB identifier in this case.
 java.lang.String getSpeciesCodingSystem()
          Get just the universal id of the sending facility, the VMDB identifier in this case.
 java.lang.String getSpeciesText()
          Get just the universal id of the sending facility, the VMDB identifier in this case.
 java.lang.String getStrain()
          Get strain string
 java.util.Iterator listPatientIds()
          Get the patient identifier list as a Java iterator over the repeating Field.
 void setBreed(CEElement ceSpecies)
          Set the coded breed.
 void setBreed(java.lang.String sCode, java.lang.String sText, java.lang.String sCodeType)
          Set the coded breed.
 void setBreed(java.lang.String sCode, java.lang.String sText, java.lang.String sCodeType, java.lang.String sAltCode, java.lang.String sAltText, java.lang.String sAltCodeType)
          Set the coded breed.
 void setDateOfBirth(java.lang.String sBDate)
          Set the date of birth (date time but who's going to include time)
 void setDateOfBirth(TSElement tsBDate)
          Set the date of birth (date time but who's going to include time)
 void setMultipleBirth(boolean bMulti)
          Set multiple birth indicator to true or false
 void setPatientAddress(XADElement xadAddress)
          Set full patient address as XAD element defined as completely as you like
 void setPatientCountry(java.lang.String sCountry)
          Set patient country as just a single string (ISO abbreviation prefered)
 void setPatientName(java.lang.String sPatName)
          Set patient name as just a single string (usually "Confidential")

TODO: Make "Confidential" the default for new PIDs?
 void setPatientName(XPNElement xpnName)
          Set full patient name as XPN element defined as completely as you like.
 void setPatientZipcode(java.lang.String sZipcode)
          Set patient zipcode as just a single string
 void setSex(java.lang.String sSex)
          Set the administrative sex
 void setSpecies(CEElement ceSpecies)
          Set the coded species.
 void setSpecies(java.lang.String sCode, java.lang.String sText, java.lang.String sCodeType)
          Set the coded species.
 void setSpecies(java.lang.String sCode, java.lang.String sText, java.lang.String sCodeType, java.lang.String sAltCode, java.lang.String sAltText, java.lang.String sAltCodeType)
          Set the coded species.
 void setStrain(java.lang.String sStrain)
          Set the Strain
 
Methods inherited from class org.vmdb.hl7.HL7Segment
clearField, getField, getFieldValue, iterator, listFields, setField, setField, setField, setField, setField, setField, setField, toString, toXML
 
Methods inherited from class org.vmdb.hl7.HL7Object
getRule
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PIDSegment

public PIDSegment()
Construct an empty patient identification segment.


PIDSegment

public PIDSegment(HL7SegmentContainer msgParent)
Construct an empty patient identification segment, setting its containing message object.

Parameters:
msgParent - HL7SegmentContainer (normally a Group 4 loop) object that contains this segment.
Method Detail

addPatientId

public void addPatientId(java.lang.String sId,
                         java.lang.String sAssigningAuthority)
Set the sending facility. This version takes only the facility ID.


listPatientIds

public java.util.Iterator listPatientIds()
Get the patient identifier list as a Java iterator over the repeating Field. Each Object in the iteration is a CXElement

Returns:
Iterator with all CXElements or null if none or error

setPatientName

public void setPatientName(java.lang.String sPatName)
Set patient name as just a single string (usually "Confidential")

TODO: Make "Confidential" the default for new PIDs?

Parameters:
sPatName - String of patient name

setPatientName

public void setPatientName(XPNElement xpnName)
Set full patient name as XPN element defined as completely as you like.

Parameters:
xpnName - XPNElement with name defined

getPatientNameString

public java.lang.String getPatientNameString()
Get just the name string stored in family name.

Returns:
String with family name

getPatientName

public XPNElement getPatientName()
Get the full patient name as XPNElement

Returns:
XPNElement with fully defined name

setDateOfBirth

public void setDateOfBirth(java.lang.String sBDate)
Set the date of birth (date time but who's going to include time)

Parameters:
sBDate - String with date in ISO format

setDateOfBirth

public void setDateOfBirth(TSElement tsBDate)
Set the date of birth (date time but who's going to include time)


getDateOfBirth

public java.lang.String getDateOfBirth()
Get birthdate string

Returns:
String with birthdate in ISO format

setSex

public void setSex(java.lang.String sSex)
Set the administrative sex

Parameters:
sSex - String with gender as M, C, T, F, S, O, U, H, or X

getSex

public java.lang.String getSex()
Get birthdate string

Returns:
String with sex

setPatientZipcode

public void setPatientZipcode(java.lang.String sZipcode)
Set patient zipcode as just a single string

Parameters:
sZipcode - String of patient zipcode

setPatientCountry

public void setPatientCountry(java.lang.String sCountry)
Set patient country as just a single string (ISO abbreviation prefered)

Parameters:
sCountry - String of patient country

setPatientAddress

public void setPatientAddress(XADElement xadAddress)
Set full patient address as XAD element defined as completely as you like

Parameters:
xadAddress - XADElement with address set

getPatientZipcode

public java.lang.String getPatientZipcode()
Get just the zipcode string from address

Returns:
String with zipcode

getPatientCountry

public java.lang.String getPatientCountry()
Get just the Country string from address

Returns:
String with Country

getPatientAddress

public XADElement getPatientAddress()
Get the full patient address as XADElement

Returns:
XADElement with fully defined name

setMultipleBirth

public void setMultipleBirth(boolean bMulti)
Set multiple birth indicator to true or false

Parameters:
bMulti - boolean true if multiple

getMultipleBirth

public boolean getMultipleBirth()
Get birthdate string

Returns:
String with sex

setSpecies

public void setSpecies(java.lang.String sCode,
                       java.lang.String sText,
                       java.lang.String sCodeType)
Set the coded species. This version takes the fully qualified CE elements

Parameters:
sCode - code value normally Snomed CT
sText - spelled out term

setSpecies

public void setSpecies(java.lang.String sCode,
                       java.lang.String sText,
                       java.lang.String sCodeType,
                       java.lang.String sAltCode,
                       java.lang.String sAltText,
                       java.lang.String sAltCodeType)
Set the coded species. This version takes the fully qualified CE elements

Parameters:
sCode - code value normally Snomed CT
sText - spelled out term
sAltCode - alternate code value for the SAME species
sAltText - spelled out term

setSpecies

public void setSpecies(CEElement ceSpecies)
Set the coded species. This version takes the fully qualified CE elements

Parameters:
ceSpecies - species as preformed CEElement

getSpecies

public CEElement getSpecies()
Get the species code as the complete CEElement

Returns:
CEElement with coded species

getSpeciesText

public java.lang.String getSpeciesText()
Get just the universal id of the sending facility, the VMDB identifier in this case.

Returns:
String with species spelled out

getSpeciesCode

public java.lang.String getSpeciesCode()
Get just the universal id of the sending facility, the VMDB identifier in this case.

Returns:
String with coded (normally snomed) species

getSpeciesCodingSystem

public java.lang.String getSpeciesCodingSystem()
Get just the universal id of the sending facility, the VMDB identifier in this case.

Returns:
String with coding system used for species (normally snomed)

setBreed

public void setBreed(java.lang.String sCode,
                     java.lang.String sText,
                     java.lang.String sCodeType)
Set the coded breed. This version takes the fully qualified CE elements

Parameters:
sCode - code value normally Snomed CT
sText - spelled out term

setBreed

public void setBreed(java.lang.String sCode,
                     java.lang.String sText,
                     java.lang.String sCodeType,
                     java.lang.String sAltCode,
                     java.lang.String sAltText,
                     java.lang.String sAltCodeType)
Set the coded breed. This version takes the fully qualified CE elements

Parameters:
sCode - code value normally Snomed CT
sText - spelled out term
sAltCode - alternate code for the same Breed
sAltText - spelled out term

setBreed

public void setBreed(CEElement ceSpecies)
Set the coded breed. This version takes the predefined CE element

Parameters:
ceSpecies -

getBreed

public CEElement getBreed()
Get the breed code as the complete CEElement

Returns:
CEElement with coded species

getBreedCode

public java.lang.String getBreedCode()
Get just the breed code value.

Returns:
String with id

getBreedText

public java.lang.String getBreedText()
Get just the text of the breed code value.

Returns:
String with id

getBreedCodingSystem

public java.lang.String getBreedCodingSystem()
Get just the coding system of the breed code value.

Returns:
String with coding system (normally snomed)

setStrain

public void setStrain(java.lang.String sStrain)
Set the Strain

Parameters:
sStrain - String with strain

getStrain

public java.lang.String getStrain()
Get strain string

Returns:
String with strain

SourceForge.net Logo