Skip to main content

HS.SDA3.Encounter

serial class HS.SDA3.Encounter extends HS.SDA3.SuperClass

HS.SDA3.Encounter corresponds to the CDA Encounters section and to /ClinicalDocument/componentOf/encompassingEncounter.

Property Inventory

Parameters

parameter CANOVERRIDEPROPLIST = EncounterType;
Inherited description: A comma separated list of properties where the calling streamlet can override the behavior of that property in the generated UpdateSDA method

Properties

property AccountNumber as %String (MAXLEN = 220);
Patient account number

HL7: PID-18.1 : PatientAccountNumber.IDNumber
VIEWERLIB: User.HS.PAAdm(PAADMAdmRef)
Property methods: AccountNumberDisplayToLogical(), AccountNumberGet(), AccountNumberIsValid(), AccountNumberLogicalToDisplay(), AccountNumberLogicalToOdbc(), AccountNumberNormalize(), AccountNumberSet()
property ActionCode as %String;
Supported values:
D = Delete this Encounter and any other Streamlets linked to it via EncounterNumber
E = Delete this Encounter only if no other Streamlets are linked to it via EncounterNumber
C = Clear all Encounters for this Patient and any other Streamlets linked to them via EncounterNumber
R = Replace (First delete existing Encounter, then insert given Encounter)
Any other value = Add or Update

For ActionCode="R", any Streamlets linked to the original Encounter will
also be deleted unless there are matching Streamlets in the inbound SDA.
See the annotation on the superclass property for more information on how
ActionCode is used.

VIEWERLIB: Not stored
Property methods: ActionCodeDisplayToLogical(), ActionCodeGet(), ActionCodeIsValid(), ActionCodeLogicalToDisplay(), ActionCodeLogicalToOdbc(), ActionCodeNormalize(), ActionCodeSet()
property ActionScope as %String;
Not used.
Property methods: ActionScopeDisplayToLogical(), ActionScopeGet(), ActionScopeIsValid(), ActionScopeLogicalToDisplay(), ActionScopeLogicalToOdbc(), ActionScopeNormalize(), ActionScopeSet()
property AdmissionSource as HS.SDA3.CodeTableDetail.AdmissionSource;
Code for source of admission (e.g. referral, accident, walk-in)

HL7ToSDA3:
PV1-14 will be parsed as the AdmissionSource Code. HL7ToSDA3 does not set
the Description.

HL7: PV1-14 : AdmitSource
SDATableName=AdmissionSource, ViewerClass=User.HS.PACAdmSource
VIEWERLIB: User.HS.PAAdm(PAADMAdmSrcDR)
Property methods: AdmissionSourceGet(), AdmissionSourceGetObject(), AdmissionSourceGetObjectId(), AdmissionSourceGetSwizzled(), AdmissionSourceIsEmpty(), AdmissionSourceIsValid(), AdmissionSourceNewObject(), AdmissionSourceSet(), AdmissionSourceSetObject(), AdmissionSourceSetObjectId(), AdmissionSourceUnSwizzle()
property AdmissionType as HS.SDA3.CodeTableDetail.AdmissionType;
Type of admission: Accident/Newborn/Elective etc.

HL7ToSDA3:
PV1-4 will be parsed as the AdmissionType Code. HL7ToSDA3 does not set the
Description.

HL7: PV1-4 : AdmissionType
SDATableName=AdmissionType, ViewerClass=User.HS.PACInPatAdmissionType
VIEWERLIB: User.HS.PAAdm(PAADMInPatAdmTypeDR)
Property methods: AdmissionTypeGet(), AdmissionTypeGetObject(), AdmissionTypeGetObjectId(), AdmissionTypeGetSwizzled(), AdmissionTypeIsEmpty(), AdmissionTypeIsValid(), AdmissionTypeNewObject(), AdmissionTypeSet(), AdmissionTypeSetObject(), AdmissionTypeSetObjectId(), AdmissionTypeUnSwizzle()
property AdmitReason as HS.SDA3.CodeTableDetail.AdmitReason;
Code for reason for admission

HL7ToSDA3:
PV2-3 will only be parsed if subfield 1 or 2 is not null.

HL7: PV2-3 : AdmitReason
SDATableName=AdmitReason, ViewerClass=User.HS.PACAdmCategory
VIEWERLIB: User.HS.PAAdm(PAADMAdmCategDR)

.Code
HL7: PV2-3.1 : AdmitReason.Identifier
VIEWERLIB: User.HS.PACAdmCategory(ADMCATCode)
.Description
HL7: PV2-3.2 : AdmitReason.Text
VIEWERLIB: User.HS.PACAdmCategory(ADMCATDesc)
.SDACodingStandard
HL7: PV2-3.3 : AdmitReason.NameofCodingSystem
VIEWERLIB: Not stored
Property methods: AdmitReasonGet(), AdmitReasonGetObject(), AdmitReasonGetObjectId(), AdmitReasonGetSwizzled(), AdmitReasonIsEmpty(), AdmitReasonIsValid(), AdmitReasonNewObject(), AdmitReasonSet(), AdmitReasonSetObject(), AdmitReasonSetObjectId(), AdmitReasonUnSwizzle()
property AdmittingClinician as HS.SDA3.CodeTableDetail.CareProvider;
Clinician who admitted the patient in this encounter

HL7ToSDA3:
Though PV1-17 is a repeating field, HL7ToSDA3 will only use the first
instance.

Streamlet cache:
In the OnValidate method of the Streamlet class, if AdmittingClinician is
null, it will be defaulted to the first ConsultingClinician with a Code or
Description, if there is one.

HL7: PV1-17 : AdmittingDoctor
SDATableName=CareProvider, ViewerClass=User.HS.CTCareProv
VIEWERLIB: User.HS.PAAdm(PAADMAdmDocCodeDR)

.Code
HL7: PV1-17.1 : AdmittingDoctor.IDNumber
VIEWERLIB: User.HS.CTCareProv(CTPCPCode)
.Description
HL7ToSDA3:
The name is formatted as "[Family], [Given]" to make the Description.
HL7: PV1-17.2.1 : AdmittingDoctor.FamilyName.Surname
HL7: PV1-17.3 : AdmittingDoctor.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPDesc)
.SDACodingStandard
HL7: PV1-17.9 : AdmittingDoctor.AssigningAuthority
VIEWERLIB: Not stored
.Name.FamilyName
HL7: PV1-17.2.1 : AdmittingDoctor.FamilyName.Surname
VIEWERLIB: User.HS.CTCareProv(CTPCPSurname)
.Name.GivenName
HL7: PV1-17.3 : AdmittingDoctor.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPFirstName)
.Name.MiddleName
HL7: PV1-17.4 : AdmittingDoctor.SecondandFurtherGivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPOtherName)
.Name.NamePrefix
HL7: PV1-17.6 : AdmittingDoctor.Prefix
VIEWERLIB: User.HS.CTCareProv(CTPCPTitle)
.Name.NameSuffix
HL7: PV1-17.7 : AdmittingDoctor.Degree
VIEWERLIB: User.HS.CTCareProv(CTPCPTextTwo)
Property methods: AdmittingClinicianGet(), AdmittingClinicianGetObject(), AdmittingClinicianGetObjectId(), AdmittingClinicianGetSwizzled(), AdmittingClinicianIsEmpty(), AdmittingClinicianIsValid(), AdmittingClinicianNewObject(), AdmittingClinicianSet(), AdmittingClinicianSetObject(), AdmittingClinicianSetObjectId(), AdmittingClinicianUnSwizzle()
property AssignedBed as %String;
Last Reported Bed code

Streamlet cache:
AssignedRoom and AssignedBed require an AssignedWard to be stored in the
Streamlet Cache. In the OnBeforeMatch method of the Streamlet class, if
either AssignedRoom or AssignedBed are not null and AssignedWard is null,
an alert will be logged and AssignedRoom and AssignedBed set to null.

Viewer cache:
AssignedBed will be processed into the Viewer Cache as a PACBed code table
entry with BEDCode=AssignedBed. PACBed has no description field. Because a
bed "belongs to" a ward in the Viewer Cache, a valid AssignedWard on the
Encounter is required to process AssignedBed. If the SDA also contains an
AssignedRoom, the AssignedBed will be linked to that in the Viewer Cache as
well.

HL7: PV1-3.3 : AssignedPatientLocation.Bed
SDATableName=Bed, ViewerClass=User.HS.PACBed
VIEWERLIB: User.HS.PAAdm(PAADMCurrentBedDR)
Property methods: AssignedBedDisplayToLogical(), AssignedBedGet(), AssignedBedIsValid(), AssignedBedLogicalToDisplay(), AssignedBedLogicalToOdbc(), AssignedBedNormalize(), AssignedBedSet()
property AssignedRoom as %String;
Last Reported Room code

Streamlet cache:
AssignedRoom and AssignedBed require an AssignedWard to be stored in the
Streamlet Cache. In the OnBeforeMatch method of the Streamlet class, if
either AssignedRoom or AssignedBed are not null and AssignedWard is null,
an alert will be logged and AssignedRoom and AssignedBed set to null.

Viewer cache:
AssignedRoom will be processed into the Viewer Cache as a PACRoom code
table entry with ROOMDesc=AssignedWard and ROOMCode=[a unique value
computed internally]. Because a room "belongs to" a ward in the Viewer
Cache, a valid AssignedWard on the Encounter is required to process
AssignedRoom.

HL7: PV1-3.2 : AssignedPatientLocation.Room
SDATableName=Room, ViewerClass=User.HS.PACRoom
VIEWERLIB: User.HS.PAAdm(PAADMCurrentRoomDR)
Property methods: AssignedRoomDisplayToLogical(), AssignedRoomGet(), AssignedRoomIsValid(), AssignedRoomLogicalToDisplay(), AssignedRoomLogicalToOdbc(), AssignedRoomNormalize(), AssignedRoomSet()
property AssignedWard as %String;
Last Reported Ward code

Streamlet cache:
AssignedRoom and AssignedBed require an AssignedWard to be stored in the
Streamlet Cache. In the OnBeforeMatch method of the Streamlet class, if
either AssignedRoom or AssignedBed are not null and AssignedWard is null,
an alert will be logged and AssignedRoom and AssignedBed set to null.

Viewer cache:
AssignedWard will be processed into the Viewer Cache as a PACWard code
table entry with both WARDCode and WARDDesc = AssignedWard. Because a ward
"belongs to" a healthcare facility in the Viewer Cache, a valid
HealthCareFacility on the Encounter is required to process AssignedWard.

HL7: PV1-3.1 : AssignedPatientLocation.PointOfCare
SDATableName=Ward, ViewerClass=User.HS.PACWard
VIEWERLIB: User.HS.PAAdm(PAADMCurrentWardDR)
Property methods: AssignedWardDisplayToLogical(), AssignedWardGet(), AssignedWardIsValid(), AssignedWardLogicalToDisplay(), AssignedWardLogicalToOdbc(), AssignedWardNormalize(), AssignedWardSet()
property AttendingClinicians as list of HS.SDA3.CodeTableDetail.CareProvider;
List of clinicians who attended to the patient during this encounter

Viewer cache:
Only the first AttendingClinician in the list is included in the patient's
record in the Viewer Cache.

HL7: PV1-7 : AttendingDoctor
SDATableName=CareProvider, ViewerClass=User.HS.CTCareProv
VIEWERLIB: User.HS.PAAdm(PAADMTreatingDrDR)

.Code
HL7: PV1-7.1 : AttendingDoctor.IDNumber
VIEWERLIB: User.HS.CTCareProv(CTPCPCode)
.Description
HL7ToSDA3:
The name is formatted as "[Family], [Given]" to make the Description.
HL7: PV1-7.2.1 : AttendingDoctor.FamilyName.Surname
HL7: PV1-7.3 : AttendingDoctor.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPDesc)
.SDACodingStandard
HL7: PV1-7.9 : AttendingDoctor.AssigningAuthority
VIEWERLIB: Not stored
.Name.FamilyName
HL7: PV1-7.2.1 : AttendingDoctor.FamilyName.Surname
VIEWERLIB: User.HS.CTCareProv(CTPCPSurname)
.Name.GivenName
HL7: PV1-7.3 : AttendingDoctor.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPFirstName)
.Name.MiddleName
HL7: PV1-7.4 : AttendingDoctor.SecondandFurtherGivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPOtherName)
.Name.NamePrefix
HL7: PV1-7.6 : AttendingDoctor.Prefix
VIEWERLIB: User.HS.CTCareProv(CTPCPTitle)
.Name.NameSuffix
HL7: PV1-7.7 : AttendingDoctor.Degree
VIEWERLIB: User.HS.CTCareProv(CTPCPTextTwo)
Property methods: AttendingCliniciansBuildValueArray(), AttendingCliniciansCollectionToDisplay(), AttendingCliniciansCollectionToOdbc(), AttendingCliniciansDisplayToCollection(), AttendingCliniciansGet(), AttendingCliniciansGetObject(), AttendingCliniciansGetObjectId(), AttendingCliniciansGetSwizzled(), AttendingCliniciansIsValid(), AttendingCliniciansOdbcToCollection(), AttendingCliniciansSet(), AttendingCliniciansSetObject(), AttendingCliniciansSetObjectId()
property ConsultingClinicians as list of HS.SDA3.CodeTableDetail.CareProvider;
List of clinicians who consulted during this encounter

Streamlet cache:
In the OnValidate method of the Streamlet class, if AdmittingClinician is
null, it will be defaulted to the first ConsultingClinician, if there is
one.

Viewer cache:
Only the first ConsultingClinician in the list is included in the patient's
record in the Viewer Cache.

HL7: PV1-9 : ConsultingDoctor
SDATableName=CareProvider, ViewerClass=User.HS.CTCareProv
VIEWERLIB: User.HS.PAAdm(PAADMInternalrefDocDR)

.Code
HL7: PV1-9.1 : ConsultingDoctor.IDNumber
VIEWERLIB: User.HS.CTCareProv(CTPCPCode)
.Description
HL7ToSDA3:
The name is formatted as "[Family], [Given]" to make the Description.
HL7: PV1-9.2.1 : ConsultingDoctor.FamilyName.Surname
HL7: PV1-9.3 : ConsultingDoctor.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPDesc)
.SDACodingStandard
HL7: PV1-9.9 : ConsultingDoctor.AssigningAuthority
VIEWERLIB: Not stored
.Name.FamilyName
HL7: PV1-9.2.1 : ConsultingDoctor.FamilyName.Surname
VIEWERLIB: User.HS.CTCareProv(CTPCPSurname)
.Name.GivenName
HL7: PV1-9.3 : ConsultingDoctor.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPFirstName)
.Name.MiddleName
HL7: PV1-9.4 : ConsultingDoctor.SecondandFurtherGivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPOtherName)
.Name.NamePrefix
HL7: PV1-9.6 : ConsultingDoctor.Prefix
VIEWERLIB: User.HS.CTCareProv(CTPCPTitle)
.Name.NameSuffix
HL7: PV1-9.7 : ConsultingDoctor.Degree
VIEWERLIB: User.HS.CTCareProv(CTPCPTextTwo)
Property methods: ConsultingCliniciansBuildValueArray(), ConsultingCliniciansCollectionToDisplay(), ConsultingCliniciansCollectionToOdbc(), ConsultingCliniciansDisplayToCollection(), ConsultingCliniciansGet(), ConsultingCliniciansGetObject(), ConsultingCliniciansGetObjectId(), ConsultingCliniciansGetSwizzled(), ConsultingCliniciansIsValid(), ConsultingCliniciansOdbcToCollection(), ConsultingCliniciansSet(), ConsultingCliniciansSetObject(), ConsultingCliniciansSetObjectId()
property DiagnosisRelatedGroup as HS.SDA3.CodeTableDetail.DiagnosisRelatedGroup;
The diagnosis-related group (DRG) for this visit.

HL7: DRG-1 : DiagnosisRelatedGroup
VIEWERLIB: Not stored
Property methods: DiagnosisRelatedGroupGet(), DiagnosisRelatedGroupGetObject(), DiagnosisRelatedGroupGetObjectId(), DiagnosisRelatedGroupGetSwizzled(), DiagnosisRelatedGroupIsEmpty(), DiagnosisRelatedGroupIsValid(), DiagnosisRelatedGroupNewObject(), DiagnosisRelatedGroupSet(), DiagnosisRelatedGroupSetObject(), DiagnosisRelatedGroupSetObjectId(), DiagnosisRelatedGroupUnSwizzle()
property DischargeLocation as HS.SDA3.CodeTableDetail.DischargeLocation;
Discharged-to Location

HL7ToSDA3:
PV1-37.1 is parsed as the DischargeLocation Code. HL7ToSDA3 does not set
the Description.

HL7: PV1-37.1 : DischargedtoLocation.DischargeLocation
SDATableName = DischargeLocation, ViewerClass=User.HS.PACDischargeDestination
VIEWERLIB: User.HS.PAAdm(PAADMMainMRADMDR)->User.HS.MRAdm(MRADMDischDestinDR)
Property methods: DischargeLocationGet(), DischargeLocationGetObject(), DischargeLocationGetObjectId(), DischargeLocationGetSwizzled(), DischargeLocationIsEmpty(), DischargeLocationIsValid(), DischargeLocationNewObject(), DischargeLocationSet(), DischargeLocationSetObject(), DischargeLocationSetObjectId(), DischargeLocationUnSwizzle()
property EmergencyAdmitDateTime as HS.SDA3.TimeStamp;
If this Encounter began in the Emergency Department before being
transferred to the Inpatient Department, this property reflects the
original admit time to the Emergency Department, while the FromTime should
be the time the patient was admitted to the Inpatient Department.

Streamlet cache:
This property is automatically set to the original FromTime of the
Encounter when EncounterType changes from "E" to "I". This happens in the
OnBeforeUpdateSDAEncounterType method, called before an inbound SDA updates
a matching existing SDA.

VIEWERLIB: Not stored
Property methods: EmergencyAdmitDateTimeDisplayToLogical(), EmergencyAdmitDateTimeGet(), EmergencyAdmitDateTimeIsValid(), EmergencyAdmitDateTimeLogicalToDisplay(), EmergencyAdmitDateTimeLogicalToTimeStamp(), EmergencyAdmitDateTimeLogicalToXSD(), EmergencyAdmitDateTimeNormalize(), EmergencyAdmitDateTimeOdbcToLogical(), EmergencyAdmitDateTimeSet(), EmergencyAdmitDateTimeXSDToLogical()
property EncounterCodedType as HS.SDA3.CodeTableDetail.EncounterType;
EncounterCodedType is used to allow SDA3 to support encounter type codes
beyond those that are permitted for the EncounterType property. However,
EncounterCodedType is not parsed from HL7 and is not used or stored in the
Viewer Cache. Ideally, if EncounterCodedType is used, then a mapping should
be defined of EncounterCodedType values to EncounterType values, and
EncounterType set whenever possible.

VIEWERLIB: Not stored
Property methods: EncounterCodedTypeGet(), EncounterCodedTypeGetObject(), EncounterCodedTypeGetObjectId(), EncounterCodedTypeGetSwizzled(), EncounterCodedTypeIsEmpty(), EncounterCodedTypeIsValid(), EncounterCodedTypeNewObject(), EncounterCodedTypeSet(), EncounterCodedTypeSetObject(), EncounterCodedTypeSetObjectId(), EncounterCodedTypeUnSwizzle()
property EncounterMRN as %String;
The number part of the patient MRN under which this Encounter was
last updated. This is needed at the Access Gateway, where Encounters from
multiple sources (and probably multiple MRNs) can be aggregated into a
single patient record.

Streamlet cache:
In the EncounterActions method of the Streamlet class, EncounterMRN is set
to the Number of the Patient's first PatientNumber with NumberType="MRN".
Note that this only happens on the Edge, not at the Access Gateway.

VIEWERLIB: User.HS.PAAdm(PAADMEncounterMRN)
Property methods: EncounterMRNDisplayToLogical(), EncounterMRNGet(), EncounterMRNIsValid(), EncounterMRNLogicalToDisplay(), EncounterMRNLogicalToOdbc(), EncounterMRNNormalize(), EncounterMRNSet()
property EncounterMRNAA as %String;
Assigning Authority of the EncounterMRN VIEWERLIB: Not stored
Property methods: EncounterMRNAADisplayToLogical(), EncounterMRNAAGet(), EncounterMRNAAIsValid(), EncounterMRNAALogicalToDisplay(), EncounterMRNAALogicalToOdbc(), EncounterMRNAANormalize(), EncounterMRNAASet()
property EncounterNumber as %String (MAXLEN = 220);
See the annotation on the superclass property for more info on how the
EncounterNumber property is used.

The method GenerateEncounterNum of the Encounter Streamlet class is used to
generate an encounter number when none is given, both in HL7ToSDA3 and in
the Streamlet class. They differ in the source of the values passed to the
method, but in both cases the logic is:
-If the encounter type is "G" or "S", generate EncounterNumber as "HSgenerated[incremental#]".
-Else if the MRN and encounter admit date are not null, generate EncounterNumber as "[MRN]-[admit date]"
-Else no EncounterNumber can be generated.

HL7ToSDA3:
If a message contains a PV1 segment but has no value in PV1-19.1, HL7ToSDA3
will call GenerateEncounterNum to generate one, passing it the following
values:
-PV1-2 (Patient Class) as encounter type.
-The source of the MRN value is:
--PID-2.1 (Patient ID.ID Number), if not null.
--Else the first PID-3.1 (Patient Identifier List.ID Number) with PID-3.5 (Identifier Type Code) = "MR", "MRN", or "PI", if there is one
--Else the first PID-4.1 (Alternate Patient ID.ID Number) with PID-4.5 (Identifier Type Code) = "MR", "MRN", or "PI", if there is one
-PV1-44.1 (Admit Date/Time.Time) as the admit date.
If no EncounterNumber can be generated, a warning will be logged, no
Encounter will be parsed to the SDA, and all streamlets in the SDA will be
Encounter-less.

Streamlet cache:
In the OnBeforeMatch method of the Streamlet class, if EncounterNumber is
null, it is defaulted to the ExternalId. Then, if EncounterNumber contains
a pipe character ("|"), an error will be logged and the Encounter will not
be processed. If the EncounterNumber is null at this point,
GenerateEncounterNum will be called with the following values:
-The SDA EncounterType as the encounter type
-The Number of the first PatientNumber in the SDA with NumberType="MRN" as the MRN
-The SDA FromTime as as the admit date
If no EncounterNumber can be generated, an error will be logged and the
Encounter will not be processed.
In the EncounterActions method, after OnBeforeMatch is called, if the
Streamlet (not SDA) EncounterNumber is null, an error will be logged and
the Encounter will not be processed.

HL7: PV1-19.1 : VisitNumber.IDNumber
VIEWERLIB: User.HS.PAAdm(PAADMADMNo)
Property methods: EncounterNumberDisplayToLogical(), EncounterNumberGet(), EncounterNumberIsValid(), EncounterNumberLogicalToDisplay(), EncounterNumberLogicalToOdbc(), EncounterNumberNormalize(), EncounterNumberSet()
property EncounterNumberAssigningAuthority as %String);
Identifies the system that assigned the encounter number.
HL7: PV1-19.4.2
VIEWERLIB: Not stored
Property methods: EncounterNumberAssigningAuthorityDisplayToLogical(), EncounterNumberAssigningAuthorityGet(), EncounterNumberAssigningAuthorityIsValid(), EncounterNumberAssigningAuthorityLogicalToDisplay(), EncounterNumberAssigningAuthorityLogicalToOdbc(), EncounterNumberAssigningAuthorityNormalize(), EncounterNumberAssigningAuthoritySet()
property EncounterType as %String;
Type of encounter
See also the EncounterCodedType property
Supported values:
E = Emergency
I = Inpatient
O = Outpatient
C = Community
N = Not Applicable (HL7) or New Born (Viewer Cache)
P = Pre-admit
G = Generated
S = Silent

In the Clinical Viewer, Generated encounters do not appear on the encounter
timeline but do appear on the Encounters chart. The data within them is
selected unless "Deselect All" is clicked. Silent encounters do not appear
on the encounter timeline or the Encounters chart, and the data within them
is always selected. Also, if a patient's SDA contains data that is not
connected to an Encounter but is "Encounter-level" in the Viewer Cache,
HealthShare will connect that data to the patient's silent encounter in the
Viewer Cache only. If the patient does not have a silent encounter in their
SDA, HealthShare will create one in the Viewer Cache only.

Streamlet cache:
In the OnBeforeMatch method of the Streamlet class, if the EncounterType is
"P", it will be mapped to "I". In the OnValidate method, if EncounterType
is null, it will be defaulted to "O". Any other invalid values will
generate an Alert and be defaulted to "O".

Viewer cache:
Any value that is not E, I, O, N, G, P, S, or C gets defaulted to "O". The
value that appears in the Viewer does not come from the DISPLAYLIST of the
PAADMType property, but rather the Description for the corresponding
AdmType Standard Type Item. See the HS documentation for guidance on
configuring this. Note that by default there are only entries for codes
"I", "O", and "E", and in starting in HSVIEWER 15.03, "C". See the Clinical
Viewer documentation for instructions on adding "C" to versions prior to
15.03.

HL7: PV1-2 : PatientClass
VIEWERLIB: User.HS.PAAdm(PAADMType)
Property methods: EncounterTypeDisplayToLogical(), EncounterTypeGet(), EncounterTypeIsValid(), EncounterTypeLogicalToDisplay(), EncounterTypeLogicalToOdbc(), EncounterTypeNormalize(), EncounterTypeSet()
property EndTime as HS.SDA3.TimeStamp;
When storing SDA as streamlets, EndTime is not intended to come from the
data provider, but rather is calculated from other fields.

Streamlet cache:
In the OnBeforeMatch method of the Streamlet class, the value of EndTime is
calculated as:
-If ToTime is not null, ToTime
-Else if EncounterType="I", two double quotes (the delete instruction)
-Else, FromTime.

Viewer cache:
EndTime itself is not stored in the Viewer Cache, but the value of
PAADMVisitStatus is derived from it: "D" if EndTime is not null, and "A"
otherwise. Also, the value that appears in the Viewer does not come from
the DISPLAYLIST of the PAADMVisitStatus property, but rather the
Description of the corresponding AdmStatus Standard Type Item. See the HS
documentation for guidance on configuring this.

VIEWERLIB: User.HS.PAAdm(PAADMVisitStatus)
Property methods: EndTimeDisplayToLogical(), EndTimeGet(), EndTimeIsValid(), EndTimeLogicalToDisplay(), EndTimeLogicalToTimeStamp(), EndTimeLogicalToXSD(), EndTimeNormalize(), EndTimeOdbcToLogical(), EndTimeSet(), EndTimeXSDToLogical()
property EnteredAt as HS.SDA3.CodeTableDetail.Organization;
HL7ToSDA3:
MSH-4.1 is parsed as the EnteredAt Code. HL7ToSDA3 does not set the
Description.

HL7: MSH-4.1 : SendingFacility.NamespaceID
SDATableName=Organization, ViewerClass=User.HS.CTHospital
VIEWERLIB: User.HS.PAAdm(PAADMUpdateUserHospitalDR)
Property methods: EnteredAtGet(), EnteredAtGetObject(), EnteredAtGetObjectId(), EnteredAtGetSwizzled(), EnteredAtIsEmpty(), EnteredAtIsValid(), EnteredAtNewObject(), EnteredAtSet(), EnteredAtSetObject(), EnteredAtSetObjectId(), EnteredAtUnSwizzle()
property EnteredBy as HS.SDA3.CodeTableDetail.User;
HL7ToSDA3:
Though EVN-5 is a repeating field, HL7ToSDA3 will only use the first
instance.

HL7: EVN-5 : OperatorID
SDATableName=User, ViewerClass=User.HS.SSUser
VIEWERLIB: User.HS.PAAdm(PAADMUpdateUserDR)

.Code
HL7: EVN-5.1 : OperatorID.IDNumber
VIEWERLIB: User.HS.SSUser(SSUSRInitials)
.Description
HL7ToSDA3:
The name is formatted as "[Family], [Given]" to make the Description.
HL7: EVN-5.2.1 : OperatorID.FamilyName.Surname
HL7: EVN-5.3 : OperatorID.GivenName
VIEWERLIB: User.HS.SSUser(SSUSRName)
.SDACodingStandard
HL7: EVN-5.9 : OperatorID.AssigningAuthority
VIEWERLIB: Not stored
Property methods: EnteredByGet(), EnteredByGetObject(), EnteredByGetObjectId(), EnteredByGetSwizzled(), EnteredByIsEmpty(), EnteredByIsValid(), EnteredByNewObject(), EnteredBySet(), EnteredBySetObject(), EnteredBySetObjectId(), EnteredByUnSwizzle()
property EnteredOn as HS.SDA3.TimeStamp;
HL7: PV1-44.1 : AdmitDateTime.Time
VIEWERLIB: User.HS.PAAdm(PAADMUpdateDate) + User.HS.PAAdm(PAADMUpdateTime)
Property methods: EnteredOnDisplayToLogical(), EnteredOnGet(), EnteredOnIsValid(), EnteredOnLogicalToDisplay(), EnteredOnLogicalToTimeStamp(), EnteredOnLogicalToXSD(), EnteredOnNormalize(), EnteredOnOdbcToLogical(), EnteredOnSet(), EnteredOnXSDToLogical()
property ExpectedAdmitTime as HS.SDA3.TimeStamp;
The time that the patient is expected to be admitted

VIEWERLIB: Not stored
Property methods: ExpectedAdmitTimeDisplayToLogical(), ExpectedAdmitTimeGet(), ExpectedAdmitTimeIsValid(), ExpectedAdmitTimeLogicalToDisplay(), ExpectedAdmitTimeLogicalToTimeStamp(), ExpectedAdmitTimeLogicalToXSD(), ExpectedAdmitTimeNormalize(), ExpectedAdmitTimeOdbcToLogical(), ExpectedAdmitTimeSet(), ExpectedAdmitTimeXSDToLogical()
property ExpectedDischargeTime as HS.SDA3.TimeStamp;
The time that the patient is expected to be discharged

VIEWERLIB: Not stored
Property methods: ExpectedDischargeTimeDisplayToLogical(), ExpectedDischargeTimeGet(), ExpectedDischargeTimeIsValid(), ExpectedDischargeTimeLogicalToDisplay(), ExpectedDischargeTimeLogicalToTimeStamp(), ExpectedDischargeTimeLogicalToXSD(), ExpectedDischargeTimeNormalize(), ExpectedDischargeTimeOdbcToLogical(), ExpectedDischargeTimeSet(), ExpectedDischargeTimeXSDToLogical()
property ExpectedLOAReturnTime as HS.SDA3.TimeStamp;
The patient's expected return time, if the patient takes a leave of absence

VIEWERLIB: Not stored
Property methods: ExpectedLOAReturnTimeDisplayToLogical(), ExpectedLOAReturnTimeGet(), ExpectedLOAReturnTimeIsValid(), ExpectedLOAReturnTimeLogicalToDisplay(), ExpectedLOAReturnTimeLogicalToTimeStamp(), ExpectedLOAReturnTimeLogicalToXSD(), ExpectedLOAReturnTimeNormalize(), ExpectedLOAReturnTimeOdbcToLogical(), ExpectedLOAReturnTimeSet(), ExpectedLOAReturnTimeXSDToLogical()
property Extension as HS.Local.SDA3.EncounterExtension;
Property methods: ExtensionGet(), ExtensionGetObject(), ExtensionGetObjectId(), ExtensionGetSwizzled(), ExtensionIsEmpty(), ExtensionIsValid(), ExtensionNewObject(), ExtensionSet(), ExtensionSetObject(), ExtensionSetObjectId(), ExtensionUnSwizzle()
property ExternalId as %String (MAXLEN = 220);
Streamlet cache:
In the OnBeforeMatch method of the Streamlet class, if the EncounterNumber
is initially null, it will be defaulted to the ExternalId.

VIEWERLIB: User.HS.PAAdm(PAADMRefApprovNo)
Property methods: ExternalIdDisplayToLogical(), ExternalIdGet(), ExternalIdIsValid(), ExternalIdLogicalToDisplay(), ExternalIdLogicalToOdbc(), ExternalIdNormalize(), ExternalIdSet()
property FromTime as HS.SDA3.TimeStamp;
Time that the encounter started

Streamlet cache:
In the OnValidate method of the Streamlet class, if FromTime is null, it is
defaulted to the current date/time.

HL7: PV1-44.1 : AdmitDateTime.Time
VIEWERLIB: User.HS.PAAdm(PAADMAdmDate) + User.HS.PAAdm(PAADMAdmTime)
Property methods: FromTimeDisplayToLogical(), FromTimeGet(), FromTimeIsValid(), FromTimeLogicalToDisplay(), FromTimeLogicalToTimeStamp(), FromTimeLogicalToXSD(), FromTimeNormalize(), FromTimeOdbcToLogical(), FromTimeSet(), FromTimeXSDToLogical()
property Guarantors as list of HS.SDA3.Guarantor;
List of guarantors for this patient.

VIEWERLIB: Not stored
Property methods: GuarantorsBuildValueArray(), GuarantorsCollectionToDisplay(), GuarantorsCollectionToOdbc(), GuarantorsDisplayToCollection(), GuarantorsGet(), GuarantorsGetObject(), GuarantorsGetObjectId(), GuarantorsGetSwizzled(), GuarantorsIsValid(), GuarantorsOdbcToCollection(), GuarantorsSet(), GuarantorsSetObject(), GuarantorsSetObjectId()
property HealthCareFacility as HS.SDA3.CodeTableDetail.HealthCareFacility;
HL7ToSDA3:
PV1-10 will be parsed as the HealthCareFacility Code. HL7ToSDA3 does not
set the Description.

Streamlet cache:
If the Encounter has no HealthCareFacility, one will be defaulted with Code
and Organization.Code = SendingFacility of the SDA Container. On the
Edge, this happens in the EncounterActions method of the Streamlet class.
On the Access Gateway, this happens in the EPRFetchNotification method of
HS.Gateway.Access.Manager. On the Access Gateway, if the Container
SendingFacility is null, the Facility property of the EPRFetchNotification
is used instead.

HL7: PV1-10 : HospitalService
SDATableName=HealthCareFacility, ViewerClass=User.HS.CTLoc
VIEWERLIB: User.HS.PAAdm(PAADMDepCodeDR)

.Organization
HL7ToSDA3:
MSH-4.1 will be parsed as the Organization Code. HL7ToSDA3 does not set the
Description.
HL7: MSH-4.1 : SendingFacility.NamespaceID
SDATableName=Organization, ViewerClass=User.HS.CTHospital
VIEWERLIB: User.HS.PAAdm(PAADMHospitalDR)
Property methods: HealthCareFacilityGet(), HealthCareFacilityGetObject(), HealthCareFacilityGetObjectId(), HealthCareFacilityGetSwizzled(), HealthCareFacilityIsEmpty(), HealthCareFacilityIsValid(), HealthCareFacilityNewObject(), HealthCareFacilitySet(), HealthCareFacilitySetObject(), HealthCareFacilitySetObjectId(), HealthCareFacilityUnSwizzle()
property HealthFunds as list of HS.SDA3.HealthFund;
List of health funds associated with encounter

Streamlet cache:
In the OnBeforeMatch method of the Streamlet class, if one of the
HS.SDA3.HealthFunds does not have a HealthFund CodeTableDetail, or if it
has one but the Code and Description are null, then an alert will be logged
and the HS.SDA3.HealthFund will be removed from the list.

HL7: IN1
VIEWERLIB: see HS.SDA3.HealthFund
Property methods: HealthFundsBuildValueArray(), HealthFundsCollectionToDisplay(), HealthFundsCollectionToOdbc(), HealthFundsDisplayToCollection(), HealthFundsGet(), HealthFundsGetObject(), HealthFundsGetObjectId(), HealthFundsGetSwizzled(), HealthFundsIsValid(), HealthFundsOdbcToCollection(), HealthFundsSet(), HealthFundsSetObject(), HealthFundsSetObjectId()
property Locations as list of HS.SDA3.Location;
List of locations involved in the encounter.
HL7ToSDA3:
HL7: PV1-3.1 Point of Care, PV1-3.2 Room, PV1-3.3 Bed, PV1-3.4 Facility, PV1-3.7 Building, and PV1-3.8 Floor
HL7: PV1-6.1 Prior Point of Care, PV1-6.2 Prior Room, PV1-6.3 Prior Bed, PV1-6.4 Prior Facility, PV1-6.7 Prior Building, and PV1-6.8 Prior Floor
VIEWERLIB: Not stored
Property methods: LocationsBuildValueArray(), LocationsCollectionToDisplay(), LocationsCollectionToOdbc(), LocationsDisplayToCollection(), LocationsGet(), LocationsGetObject(), LocationsGetObjectId(), LocationsGetSwizzled(), LocationsIsValid(), LocationsOdbcToCollection(), LocationsSet(), LocationsSetObject(), LocationsSetObjectId()
property Participants as list of HS.SDA3.EncounterParticipant;
List of participants involved in the encounter.
HL7ToSDA3:
HL7: PV1-7 (Attending), PV1-8 (Referring), PV1-9 (Consulting), and PV1-17 (Admitting) are all repeating fields
VIEWERLIB: Not stored
Property methods: ParticipantsBuildValueArray(), ParticipantsCollectionToDisplay(), ParticipantsCollectionToOdbc(), ParticipantsDisplayToCollection(), ParticipantsGet(), ParticipantsGetObject(), ParticipantsGetObjectId(), ParticipantsGetSwizzled(), ParticipantsIsValid(), ParticipantsOdbcToCollection(), ParticipantsSet(), ParticipantsSetObject(), ParticipantsSetObjectId()
property PreAdmissionNumber as %String (MAXLEN = 220);
A number given to the patient prior to being admitted but while information
is being gathered

HL7: PV1-5.1 : PreadmitNumber.IDNumber
VIEWERLIB: User.HS.PAAdm(PAADMPreAdmNo)
Property methods: PreAdmissionNumberDisplayToLogical(), PreAdmissionNumberGet(), PreAdmissionNumberIsValid(), PreAdmissionNumberLogicalToDisplay(), PreAdmissionNumberLogicalToOdbc(), PreAdmissionNumberNormalize(), PreAdmissionNumberSet()
property PriorBed as %String;
VIEWERLIB: Not stored
Property methods: PriorBedDisplayToLogical(), PriorBedGet(), PriorBedIsValid(), PriorBedLogicalToDisplay(), PriorBedLogicalToOdbc(), PriorBedNormalize(), PriorBedSet()
property PriorRoom as %String;
VIEWERLIB: Not stored
Property methods: PriorRoomDisplayToLogical(), PriorRoomGet(), PriorRoomIsValid(), PriorRoomLogicalToDisplay(), PriorRoomLogicalToOdbc(), PriorRoomNormalize(), PriorRoomSet()
property PriorVisitNumber as %String (MAXLEN = 220);
If the EncounterNumber of this Encounter was changed or if another
Encounter was merged into this one, this is the old/other EncounterNumber.
See the chapter "Correcting Patient Records" in the book "Data Flow and
Message Processing" in the HS documentation for more info.

HL7: MRG-5 : PriorVisitNumber
VIEWERLIB: Not stored
Property methods: PriorVisitNumberDisplayToLogical(), PriorVisitNumberGet(), PriorVisitNumberIsValid(), PriorVisitNumberLogicalToDisplay(), PriorVisitNumberLogicalToOdbc(), PriorVisitNumberNormalize(), PriorVisitNumberSet()
property PriorWard as %String;
VIEWERLIB: Not stored
Property methods: PriorWardDisplayToLogical(), PriorWardGet(), PriorWardIsValid(), PriorWardLogicalToDisplay(), PriorWardLogicalToOdbc(), PriorWardNormalize(), PriorWardSet()
The priority of this visit (Emergency, Urgent, Elective, etc.)

VIEWERLIB: Not stored
Property methods: PriorityGet(), PriorityGetObject(), PriorityGetObjectId(), PriorityGetSwizzled(), PriorityIsEmpty(), PriorityIsValid(), PriorityNewObject(), PrioritySet(), PrioritySetObject(), PrioritySetObjectId(), PriorityUnSwizzle()
property PublicityCode as HS.SDA3.CodeTableDetail.PublicityCode;
What level of publicity is allowed for this visit (Family only, No
publicity, etc.)

VIEWERLIB: Not stored
Property methods: PublicityCodeGet(), PublicityCodeGetObject(), PublicityCodeGetObjectId(), PublicityCodeGetSwizzled(), PublicityCodeIsEmpty(), PublicityCodeIsValid(), PublicityCodeNewObject(), PublicityCodeSet(), PublicityCodeSetObject(), PublicityCodeSetObjectId(), PublicityCodeUnSwizzle()
property RecommendationsProvided as list of HS.SDA3.Recommendation;
The recommendations for this patient forwarded to the specificied providers
and organizations on discharge.

VIEWERLIB: Not stored
Property methods: RecommendationsProvidedBuildValueArray(), RecommendationsProvidedCollectionToDisplay(), RecommendationsProvidedCollectionToOdbc(), RecommendationsProvidedDisplayToCollection(), RecommendationsProvidedGet(), RecommendationsProvidedGetObject(), RecommendationsProvidedGetObjectId(), RecommendationsProvidedGetSwizzled(), RecommendationsProvidedIsValid(), RecommendationsProvidedOdbcToCollection(), RecommendationsProvidedSet(), RecommendationsProvidedSetObject(), RecommendationsProvidedSetObjectId()
property ReferringClinician as HS.SDA3.CodeTableDetail.ReferralDoctor;
Clinician who made the referral for this encounter

HL7ToSDA3:
Though PV1-8 is a repeating field, HL7ToSDA3 will only use the first
instance.

HL7: PV1-8 : ReferringDoctor
SDATableName=ReferralDoctor, ViewerClass=User.HS.PACRefDoctor
VIEWERLIB: User.HS.PAAdm(PAADMRefDocListDR)

.Code
HL7: PV1-8.1 : ReferringDoctor.IDNumber
VIEWERLIB: User.HS.PACRefDoctor(REFDCode)
.Description
HL7ToSDA3:
The name is formatted as "[Family], [Given]" to make the Description.
HL7: PV1-8.2.1 : ReferringDoctor.FamilyName.Surname
HL7: PV1-8.3 : ReferringDoctor.GivenName
VIEWERLIB: User.HS.PACRefDoctor(REFDDesc)
.SDACodingStandard
HL7: PV1-8.9 : ReferringDoctor.AssigningAuthority
VIEWERLIB: Not stored
.Name.FamilyName
HL7: PV1-8.2.1 : PACRefDoctor.FamilyName.Surname
VIEWERLIB: User.HS.PACRefDoctor(REFDFamilyName)
.Name.GivenName
HL7: PV1-8.3 : ReferringDoctor.GivenName
VIEWERLIB: User.HS.PACRefDoctor(REFDForename)
.Name.MiddleName
HL7: PV1-8.4 : ReferringDoctor.SecondandFurtherGivenName
VIEWERLIB: User.HS.PACRefDoctor(REFDMiddleName)
.Name.NamePrefix
HL7: PV1-8.6 : ReferringDoctor.Prefix
VIEWERLIB: User.HS.PACRefDoctor(REFDTitle)
.Name.NameSuffix
HL7: PV1-8.7 : ReferringDoctor.Degree
VIEWERLIB: Not stored
Property methods: ReferringClinicianGet(), ReferringClinicianGetObject(), ReferringClinicianGetObjectId(), ReferringClinicianGetSwizzled(), ReferringClinicianIsEmpty(), ReferringClinicianIsValid(), ReferringClinicianNewObject(), ReferringClinicianSet(), ReferringClinicianSetObject(), ReferringClinicianSetObjectId(), ReferringClinicianUnSwizzle()
property SeparationMode as HS.SDA3.CodeTableDetail.SeparationMode;
The conditions under which the patient was discharged

HL7ToSDA3:
PV1-36 is parsed as the SeparationMode Code. HL7ToSDA3 does not set the
Description.

HL7: PV1-36 : DischargeDisposition
SDATableName=SeparationMode, ViewerClass=None
VIEWERLIB: Not stored
Property methods: SeparationModeGet(), SeparationModeGetObject(), SeparationModeGetObjectId(), SeparationModeGetSwizzled(), SeparationModeIsEmpty(), SeparationModeIsValid(), SeparationModeNewObject(), SeparationModeSet(), SeparationModeSetObject(), SeparationModeSetObjectId(), SeparationModeUnSwizzle()
property Specialties as list of HS.SDA3.CodeTableDetail.CareProviderType;
The clinical specialties under which the patient was treated during this
Encounter

SDATableName=CareProviderType, ViewerClass=User.HS.CTCarPrvTp
VIEWERLIB: Not stored
Property methods: SpecialtiesBuildValueArray(), SpecialtiesCollectionToDisplay(), SpecialtiesCollectionToOdbc(), SpecialtiesDisplayToCollection(), SpecialtiesGet(), SpecialtiesGetObject(), SpecialtiesGetObjectId(), SpecialtiesGetSwizzled(), SpecialtiesIsValid(), SpecialtiesOdbcToCollection(), SpecialtiesSet(), SpecialtiesSetObject(), SpecialtiesSetObjectId()
Current state of the encounter. Example values include: planned, arrived, triaged, in-progress, onleave, finished, cancelled
Property methods: StatusGet(), StatusGetObject(), StatusGetObjectId(), StatusGetSwizzled(), StatusIsEmpty(), StatusIsValid(), StatusNewObject(), StatusSet(), StatusSetObject(), StatusSetObjectId(), StatusUnSwizzle()
property ToTime as HS.SDA3.TimeStamp;
Time that the encounter ended

HL7ToSDA3:
Though PV1-45 is a repeating field, HL7ToSDA3 will only use the first
instance.

Streamlet cache:
If the EventDescription of the SDA Container is "ADT_A13" (Cancel
discharge), then in the EncounterActions method of the Streamlet class
(called on the Edge only), ToTime will be set to the delete instruction
(two double quotes).

HL7: PV1-45.1 : DischargeDateTime.Time
VIEWERLIB: User.HS.PAAdm(PAADMDischgDate) + User.HS.PAAdm(PAADMDischgTime)
Property methods: ToTimeDisplayToLogical(), ToTimeGet(), ToTimeIsValid(), ToTimeLogicalToDisplay(), ToTimeLogicalToTimeStamp(), ToTimeLogicalToXSD(), ToTimeNormalize(), ToTimeOdbcToLogical(), ToTimeSet(), ToTimeXSDToLogical()
property TransferredFromED as HS.SDA3.Boolean;
Whether this Encounter began in the Emergency Department before being
transferred to the Inpatient Department.

Streamlet cache:
This property is set to 1 automatically when an EncounterType of "E"
is changed to "I". This happens in the OnBeforeUpdateSDAEncounterType
method, called before an inbound SDA updates a matching existing SDA.

VIEWERLIB: Not stored
Property methods: TransferredFromEDDisplayToLogical(), TransferredFromEDGet(), TransferredFromEDIsValid(), TransferredFromEDIsValidDT(), TransferredFromEDLogicalToDisplay(), TransferredFromEDLogicalToXSD(), TransferredFromEDNormalize(), TransferredFromEDSet(), TransferredFromEDXSDToLogical()
property VisitDescription as %String);
Description of visit

HL7: PV2-12 : VisitDescription
VIEWERLIB: User.HS.PAAdm(PAADMRemark)
Property methods: VisitDescriptionDisplayToLogical(), VisitDescriptionGet(), VisitDescriptionIsValid(), VisitDescriptionLogicalToDisplay(), VisitDescriptionLogicalToOdbc(), VisitDescriptionNormalize(), VisitDescriptionSet()
property VisitStatus as %String (XMLIO = "IN");
Not used.
Property methods: VisitStatusDisplayToLogical(), VisitStatusGet(), VisitStatusIsValid(), VisitStatusLogicalToDisplay(), VisitStatusLogicalToOdbc(), VisitStatusNormalize(), VisitStatusSet()

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab