Skip to main content

HS.SDA3.AbstractOrder

abstract class HS.SDA3.AbstractOrder

Property Inventory

Parameters

parameter ORDERITEMTYPE;
Must be filled in on descendent class
This will determine the order type of the order item

Properties

property ActionCode as %String;
Supported values:
D = Delete
I = Inactivate all orders of this type (set Status="I")
C = Clear/delete all orders of this type
R = Replace - Applies only to Atomic Result Items. Clears previous result items before storing all new items, ignoring matching on test item code. Use ONLY when always receiving full updates. Using this with partial updates may cause a loss of test item data.
Any other value = Add or Update
See the annotation of the superclass property for more information on how
ActionCode is used.

HL7ToSDA3:
Two double quotes ("") in ORC-1 will be parsed as ActionCode="I", while
four double quotes ("""") will be parsed as ActionCode="C".
ActionCode="R" in ORC-1 will impact parsing of TestItemCode. See the TestItemCode property of HS.SDA3.LabResultItem for details.
Any other value will not be parsed.

HL7: ORC-1 : OrderControl
VIEWERLIB: Not stored
Property methods: ActionCodeDisplayToLogical(), ActionCodeGet(), ActionCodeIsValid(), ActionCodeLogicalToDisplay(), ActionCodeLogicalToOdbc(), ActionCodeNormalize(), ActionCodeSet()
property ActionScope as %String;
Only used for Medications, see the annotation in HS.SDA3.Medication.
Otherwise ActionScope is not used for Orders.

VIEWERLIB: Not stored
Property methods: ActionScopeDisplayToLogical(), ActionScopeGet(), ActionScopeIsValid(), ActionScopeLogicalToDisplay(), ActionScopeLogicalToOdbc(), ActionScopeNormalize(), ActionScopeSet()
property AuthorizationTime as HS.SDA3.TimeStamp;
Date/time the order was authorized

VIEWERLIB: User.HS.OEOrdItem(OEORIAuthorisedDate) + User.HS.OEOrdItem(OEORIAuthorisedTime)
Property methods: AuthorizationTimeDisplayToLogical(), AuthorizationTimeGet(), AuthorizationTimeIsValid(), AuthorizationTimeLogicalToDisplay(), AuthorizationTimeLogicalToTimeStamp(), AuthorizationTimeNormalize(), AuthorizationTimeOdbcToLogical(), AuthorizationTimeSet()
property CallbackNumber as %String (MAXLEN = 220);
Callback number (who to contact with questions, etc.)

HL7ToSDA3:
OBR-17 is used if any regular (business), mobile, or fax numbers or e-mail
addresses can be parsed from it, else ORC-14 is used. In either case, the
format of CallbackNumber is: "[List of business #s], Mobile: [List of
mobile #s], Fax: [List of fax #s], email: [List of e-mail addresses]". Each
list is comma-delimited. Each tag (Mobile, Fax, email) will only be used if
there are elements of that type. For each field, every instance will be
parsed, if that field is used. Up to three numbers can be parsed from each
instance of a field:
-If subfields 5, 6, 7, and 8 are not all null, a number is parsed from them
as "+[.5] ([.6]) [.7] x[.8]".
-If subfield 12 is not null, it is parsed.
-If subfield 1 is not null, it is parsed.
-Additionally, if subfield 9 is not null, the first number parsed from that
instance will have it appended to the end after a semicolon separator.
Ex: "###-###-####;Main Number"
The logic to determine the type of the number is:
-If subfield 2 is in ["",WPN,ASN,EMR] and subfield 3 is in ["",PH], the
number is a regular (business) number.
-If subfield 2 = "BPN" and subfield 3 is in [CP,BP], the number is a mobile
number.
-If subfield 2 is in ["",WPN,ASN,EMR] and subfield 3 = "FX", the number is
a fax number.
Finally, each non-null instance of subfield 4 is parsed as an e-mail
address.

HL7: OBR-17 : OrderCallbackPhoneNumber
HL7: ORC-14 : CallBackPhoneNumber
VIEWERLIB: User.HS.OEOrdItem(OEORINotify)
Property methods: CallbackNumberDisplayToLogical(), CallbackNumberGet(), CallbackNumberIsValid(), CallbackNumberLogicalToDisplay(), CallbackNumberLogicalToOdbc(), CallbackNumberNormalize(), CallbackNumberSet()
property Comments as %String);
Order Comments and notes
Length subject to the total streamlet size limit - 3,000,000

HL7ToSDA3:
Order Comments are always parsed from NTE segments, though HL7 order
messages may contain NTEs in different places, and only certain ones are
parsed to Order Comments. For ORM and OMP messages, it is the first set of
NTEs following the ORC (in the message schema, not necessarily in the
message) that are parsed to Comments. In an RDE message the set of NTEs
following the RXE segment are parsed to Order Comments. Order Comments can
only be parsed from an ORU message if it contains a text result (either
ORC-29 is not "LAB", or all OBX-2 values = "FT", "TX", or "ED"). In this
case the NTEs immediately following the OBR are parsed to Order Comments.
In an ORU containing atomic lab results, the NTEs following the OBR are
parsed to the Result Comments, and in an ORU containing Observations
(ORC-29="OBS"), these NTEs are not parsed.

HL7: NTE-3 : Comment
VIEWERLIB: User.HS.OEOrdItem(OEORIRemarks)
Property methods: CommentsDisplayToLogical(), CommentsGet(), CommentsIsValid(), CommentsLogicalToDisplay(), CommentsLogicalToOdbc(), CommentsNormalize(), CommentsSet()
property Condition as %String (MAXLEN = 220);
Condition, e.g. "keep BP below 110"

HL7ToSDA3:
Condition is parsed from (in order of precendence) TQ1-10, RXE-1.7,
OBR-27.7, or ORC-7.7. Though ORC-7 is a repeating field, HL7ToSDA3 only
parses the first non-null instance. OBR-27 is also a repeating field, and
HL7ToSDA3 parses every non-null instance of it. The last non-null instance
of Condition in OBR-27 is the one that takes precendence. Note that an
RDE_O11 message may contain TQ1 segments in two different places. HL7ToSDA3
parses the one following the RXE segment.

HL7: ORC-7.7 : QuantityTiming.Condition
HL7: OBR-27.7 : QuantityTiming.Condition
HL7: RXE-1.7 : QuantityTiming.Condition
HL7: TQ1-10 : ConditionText
VIEWERLIB: User.HS.OEOrdItem(OEORILtClinicalCondition)
Property methods: ConditionDisplayToLogical(), ConditionGet(), ConditionIsValid(), ConditionLogicalToDisplay(), ConditionLogicalToOdbc(), ConditionNormalize(), ConditionSet()
property ConfidentialityCode as HS.SDA3.CodeTableDetail.Confidentiality;
Confidentiality code (e.g. VIP, etc.)

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

HL7: ORC-28 : ConfidentialtyCode
SDATableName=Confidentiality, ViewerClass=User.HS.OECOverReasonNonConsent
VIEWERLIB: User.HS.OEOrdItem(OEORINoConsentOverrideReasDR)

.Code
HL7: ORC-28.1 : ConfidentialtyCode.Identifier
VIEWERLIB: User.HS.OECOverReasonNonConsent(ORNCCode)
.Description
HL7: ORC-28.2 : ConfidentialtyCode.Text
VIEWERLIB: User.HS.OECOverReasonNonConsent(ORNCDesc)
.SDACodingStandard
HL7: ORC-28.3 : ConfidentialtyCode.NameofCodingSystem
VIEWERLIB: Not stored
Property methods: ConfidentialityCodeGet(), ConfidentialityCodeGetObject(), ConfidentialityCodeGetObjectId(), ConfidentialityCodeGetSwizzled(), ConfidentialityCodeIsEmpty(), ConfidentialityCodeIsValid(), ConfidentialityCodeNewObject(), ConfidentialityCodeSet(), ConfidentialityCodeSetObject(), ConfidentialityCodeSetObjectId(), ConfidentialityCodeUnSwizzle()
property ConsultationDepartment as HS.SDA3.CodeTableDetail.HealthCareFacility;
Department or facility that consulted

Viewer cache:
If no Organization is given, one will be defaulted in with Code and
Description = SendingFacility of the SDA Container.

SDATableName=HealthCareFacility, ViewerClass=User.HS.CTLoc
VIEWERLIB: User.HS.OEOrdItem(OEORIConsultDepDR)

.Organization
SDATableName=Organization, ViewerClass=User.HS.CTHospital
VIEWERLIB: User.HS.CTLoc(CTLOCHospitalDR)
Property methods: ConsultationDepartmentGet(), ConsultationDepartmentGetObject(), ConsultationDepartmentGetObjectId(), ConsultationDepartmentGetSwizzled(), ConsultationDepartmentIsEmpty(), ConsultationDepartmentIsValid(), ConsultationDepartmentNewObject(), ConsultationDepartmentSet(), ConsultationDepartmentSetObject(), ConsultationDepartmentSetObjectId(), ConsultationDepartmentUnSwizzle()
property Duration as HS.SDA3.CodeTableDetail.Duration;
HL7ToSDA3:
Duration is parsed from (in order of precedence) TQ1-6, RXE-1.3, OBR-27.3,
or ORC-7.3. The RXE, OBR, and ORC fields will only set the Duration Code.
TQ1-6 will populate the Code, Description, and Factor as described below.
Though ORC-7 is a repeating field, HL7ToSDA3 only parses the first non-null
instance. OBR-27 is also a repeating field, and HL7ToSDA3 parses every
non-null instance of it. The last non-null instance of Duration in OBR-27
is the one that takes precedence. Note that an RDE_O11 message may contain
TQ1 segments in two different places. HL7ToSDA3 parses the one following
the RXE segment.

Viewer cache:
If the Order contains at least 1 DosageStep in the DosageSteps property,
and if the first DosageStep in that list has a Duration, then that Duration
will override this one in the Viewer Cache.

HL7: ORC-7.3 : QuantityTiming.Duration
HL7: OBR-27.3 : QuantityTiming.Duration
HL7: RXE-1.3 : QuantityTiming.Duration
HL7: TQ1-6 : ServiceDuration
SDATableName=Duration, ViewerClass=User.HS.PHCDuration
VIEWERLIB: User.HS.OEOrdItem(OEORIDuratDR)

.Code
HL7ToSDA3:
When parsing the TQ1-6 field, Code is initially parsed from subfield 2.1
(Units.Identifier). If subfield 1 (Quantity) is not null, then if subfields
2.1 and 2.2 (Units.Text) are null, Code will be parsed from Quantity. Then,
if Quantity starts with a non-zero number and the parsed value for Code
does not, the parsed value for Code is set to +[Quantity]_[Code]. For
example, if Quantity="2" and Units.Identifier="D", the value parsed to Code
is "2D". For the other segments that Duration Code may be parsed from (RXE,
OBR, ORC), the value is simply parsed from the field listed below.
HL7: TQ1-6.1 : ServiceDuration.Quantity
HL7: TQ1-6.2.1 : ServiceDuration.Units.Identifier
HL7: RXE-1.3 : QuantityTiming.Duration
HL7: OBR-27.3 : QuantityTiming.Duration
HL7: ORC-7.3 : QuantityTiming.Duration
VIEWERLIB: User.HS.PHCDuration(PHCDUCode)
.Description
HL7ToSDA3:
If TQ1-6.1 (Quantity) is not null and +[Quantity] is logically "true",
and if TQ1-6.2.2 (Units.Text) is not null and +[Units.Text] is logically
"false" (basically, if Quantity starts with a number and Units.Text
doesn't), then the value parsed to Description is
+[Quantity]_" "_[Units.Text]. For example, if Quantity="2" and
Units.Text="Days", the value parsed to Description is "2 Days". If these
conditions are not all met then the Description is simply parsed from
TQ1-6.2.2.
HL7: TQ1-6.1 : ServiceDuration.Quantity
HL7: TQ1-6.2.2 : ServiceDuration.Units.Text
VIEWERLIB: User.HS.PHCDuration(PHCDUDesc1)
.Factor
HL7ToSDA3:
If TQ1-6.1 (Quantity) is not null, then if +[Quantity] is logically "true",
Factor is parsed as +[Quantity], otherwise Factor is parsed as null. If
Quantity is null, then if +[TQ1-2.1/Units.Identifier] is logically "true",
Factor is parsed as +[Units.Identifier], else if +[TQ1-2.2/Units.Text] is
logically "true", Factor is parsed as +[Units.Text], else Factor is not
parsed.

HL7: TQ1-6.1 : ServiceDuration.Quantity
HL7: TQ1-6.2.1 : ServiceDuration.Units.Identifier
HL7: TQ1-6.2.2 : ServiceDuration.Units.Text
VIEWERLIB: User.HS.PHCDuration(PHCDUFactor)
Property methods: DurationGet(), DurationGetObject(), DurationGetObjectId(), DurationGetSwizzled(), DurationIsEmpty(), DurationIsValid(), DurationNewObject(), DurationSet(), DurationSetObject(), DurationSetObjectId(), DurationUnSwizzle()
property EnteredAt as HS.SDA3.CodeTableDetail.Organization;
HL7ToSDA3:
Though ORC-21 is a repeating field, only the first non-null instance is
parsed. ORC-22 is also a repeating field, however HL7ToSDA3 will only parse
the instance corresponding to the instance of ORC-21 parsed. For example,
if the third instance of ORC-21 is parsed (because the first two are null),
then the third instance of ORC-22 will be parsed as well. For Address.City,
State, Zip, Country, and County only the Code is parsed. HL7ToSDA3 does not
set the Description. Every instance of ORC-23 will be examined but may not
be parsed to the SDA. The algorithm to parse a number out of one instance
of ORC-23 is:
-If subfields 5, 6, 7, and 8 are not all null, compose the number out of
them as "+[.5] ([.6]) [.7] x[.8]".
-Else if subfield 12 is not null, use that.
-Else if subfield 1 is not null, use that.
-Else no number can be parsed from this instance.
-Whichever number is parsed, if subfield 9 of that instance is not null, it
will be appended to the number, delimited by a semicolon.
Ex: "###-###-####;Main Number"

HL7: ORC-21 : OrderingFacilityName
HL7: ORC-22 : OrderingFacilityAddress
HL7: ORC-23 : OrderingFacilityPhoneNumber
SDATableName=Organization, ViewerClass=User.HS.CTHospital
VIEWERLIB: User.HS.OEOrdItem(OEORIUserAddHospDR)

.Code
HL7ToSDA3:
ORC-21.10 will be parsed to the Code if present, else ORC-21.3 will.
HL7: ORC-21.10 : OrderingFacilityName.OrganizationIdentifier
HL7: ORC-21.3 : OrderingFacilityName.IDNumber
VIEWERLIB: User.HS.CTHospital(HOSPCode)
.Description
HL7: ORC-21.1 : OrderingFacilityName.OrganizationName
VIEWERLIB: User.HS.CTHospital(HOSPDesc)
.SDACodingStandard
HL7: ORC-21.6 : OrderingFacilityName.AssigningAuthority
VIEWERLIB: Not stored
.Address.Street
HL7ToSDA3:
If ORC-22.2 is not null, Street will be parsed as "[.1.1]; [.2]". Otherwise
Street will simply be parsed from ORC-22.1.1.
HL7: ORC-22.1.1 : OrderingFacilityAddress.StreetAddress.StreetorMailingAddress
HL7: ORC-22.2 : OrderingFacilityAddress.OtherDesignation
VIEWERLIB: User.HS.CTHospital(HOSPAddress)
.Address.City
HL7: ORC-22.3 : OrderingFacilityAddress.City
VIEWERLIB: User.HS.CTHospital(HOSPCity)
.Address.State
HL7: ORC-22.4 : OrderingFacilityAddress.StateorProvince
VIEWERLIB: User.HS.CTHospital(HOSPProvinceDR)
.Address.Zip
HL7: ORC-22.5 : OrderingFacilityAddress.ZiporPostalCode
VIEWERLIB: User.HS.CTHospital(HOSPZipDR)
.Address.Country
HL7: ORC-22.6 : OrderingFacilityAddress.Country
VIEWERLIB: User.HS.CTHospital(HOSPCountryDR)
.Address.County
HL7: ORC-22.9 : OrderingFacilityAddress.CountyParishCode
VIEWERLIB: User.HS.CTHospital(HOSPCountyParishDR)
.ContactInfo.WorkPhoneNumber
HL7ToSDA3:
WorkPhoneNumber is parsed from the first instance of ORC-23 with subfield 2
in ["",WPN,ASN,EMR] and subfield 3 in ["",PH] and from which a phone number
can be parsed using the above algorithm.
HL7: ORC-23 : OrderingFacilityPhoneNumber
VIEWERLIB: User.HS.CTHospital(HOSPPhone)
.ContactInfo.MobilePhoneNumber
HL7ToSDA3:
MobilePhoneNumber is parsed from the first instance of ORC-23 with subfield
2 = "BPN" and subfield 3 in [CP,BP] and from which a phone number can be
parsed using the above algorithm.
HL7: ORC-23 : OrderingFacilityPhoneNumber
VIEWERLIB: Not stored
.ContactInfo.EmailAddress
HL7ToSDA3:
EmailAddress is parsed from the first non-null instance of ORC-23.4.
HL7: ORC-23.4 : OrderingFacilityPhoneNumber.EmailAddress
VIEWERLIB: User.HS.CTHospital(HOSPEmail)
Property methods: EnteredAtGet(), EnteredAtGetObject(), EnteredAtGetObjectId(), EnteredAtGetSwizzled(), EnteredAtIsEmpty(), EnteredAtIsValid(), EnteredAtNewObject(), EnteredAtSet(), EnteredAtSetObject(), EnteredAtSetObjectId(), EnteredAtUnSwizzle()
property EnteredBy as HS.SDA3.CodeTableDetail.User;
HL7ToSDA3:
Though ORC-10 is a repeating field, only the first non-null instance is
parsed.

HL7: ORC-10 : EnteredBy
SDATableName=User, ViewerClass=User.HS.SSUser
VIEWERLIB: User.HS.OEOrdItem(OEORIUserUpdate)

.Code
HL7: ORC-10.1 : EnteredBy.IDNumber
VIEWERLIB: User.HS.SSUser(SSUSRInitials)
.Description
HL7ToSDA3:
The family and given names are concatenated together as "[Family], [Given]"
to make the Description.
HL7: ORC-10.2.1 : EnteredBy.FamilyName.Surname
HL7: ORC-10.3 : EnteredBy.GivenName
VIEWERLIB: User.HS.SSUser(SSUSRName)
.SDACodingStandard
HL7: ORC-10.9 : EnteredBy.AssigningAuthority
VIEWERLIB: Not stored
Property methods: EnteredByGet(), EnteredByGetObject(), EnteredByGetObjectId(), EnteredByGetSwizzled(), EnteredByIsEmpty(), EnteredByIsValid(), EnteredByNewObject(), EnteredBySet(), EnteredBySetObject(), EnteredBySetObjectId(), EnteredByUnSwizzle()
property EnteredOn as HS.SDA3.TimeStamp;
Streamlet cache:
For each type of Order, in the OnValidate method of the Streamlet class, if
FromTime is null, it is defaulted to EnteredOn. For Orders than can have
Results (LabOrder, RadOrder, OtherOrder), if the Order actually has a
Result and FromTime, EnteredOn, and Result.ResultTime are all null, an
error will be logged and the Order will not be saved.

HL7: ORC-9.1 : DateTimeofTransaction.Time
VIEWERLIB: User.HS.OEOrdItem(OEORIUpdateDate) + User.HS.OEOrdItem(OEORIUpdateTime)
Property methods: EnteredOnDisplayToLogical(), EnteredOnGet(), EnteredOnIsValid(), EnteredOnLogicalToDisplay(), EnteredOnLogicalToTimeStamp(), EnteredOnNormalize(), EnteredOnOdbcToLogical(), EnteredOnSet()
property EnteringOrganization as HS.SDA3.CodeTableDetail.HealthCareFacility;
Entering Facility (Location)

HL7ToSDA3:
ORC-13 is only parsed if subfield 1 is not null. Only the Code is parsed.
HL7ToSDA3 does not set the Description.

HL7: ORC-13.1 : EnterersLocation.PointofCare
SDATableName=HealthCareFacility, ViewerClass=User.HS.CTLoc
VIEWERLIB: User.HS.OEOrdItem(OEORIOrdDeptDR)

.Organization
HL7ToSDA3:
Only the Code is parsed. HL7ToSDA3 does not set the Description.
HL7: MSH-4.1 : SendingFacility.NamespaceID
SDATableName=Organization, ViewerClass=User.HS.CTHospital
VIEWERLIB: User.HS.CTLoc(CTLOCHospitalDR)
Property methods: EnteringOrganizationGet(), EnteringOrganizationGetObject(), EnteringOrganizationGetObjectId(), EnteringOrganizationGetSwizzled(), EnteringOrganizationIsEmpty(), EnteringOrganizationIsValid(), EnteringOrganizationNewObject(), EnteringOrganizationSet(), EnteringOrganizationSetObject(), EnteringOrganizationSetObjectId(), EnteringOrganizationUnSwizzle()
property FillerAssigningAuthority as %String (MAXLEN = 220);
The namespace from which the ID was assigned to the order when it was
filled

HL7ToSDA3:
OBR-3 will be used if a value can be parsed from it, else ORC-3 will be
used. In either case, FillerAssigningAuthority is composed of subfields 2,
3, and 4 concatenated together as "[.2]^[.3]^[.4]", but only if at least
one of these is not null.

HL7: ORC-3.2 : FillerOrderNumber.NamespaceID
HL7: ORC-3.3 : FillerOrderNumber.UniversalID
HL7: ORC-3.4 : FillerOrderNumber.UniversalIDType
HL7: OBR-3.2 : FillerOrderNumber.NamespaceID
HL7: OBR-3.3 : FillerOrderNumber.UniversalID
HL7: OBR-3.4 : FillerOrderNumber.UniversalIDType
VIEWERLIB: Not stored
Property methods: FillerAssigningAuthorityDisplayToLogical(), FillerAssigningAuthorityGet(), FillerAssigningAuthorityIsValid(), FillerAssigningAuthorityLogicalToDisplay(), FillerAssigningAuthorityLogicalToOdbc(), FillerAssigningAuthorityNormalize(), FillerAssigningAuthoritySet()
property FillerId as %String (MAXLEN = 220);
The ID assigned to the order when it was filled

HL7ToSDA3:
OBR-3.1 will be used if present, else ORC-3.1 will be used.

Streamlet cache:
The processing the FillerId undergoes in the Streamlet Cache is dependent
on the type of Order being processed:
-LAB:
In the OnBeforeMatch method of the Streamlet class, if FillerId is null, it
will be defaulted to the Result ExternalId, then to PlacerId, which itself
may have been defaulted to ExternalId. If FillerId, PlacerId, ExternalId,
and Result.ExternalId are all null, an error will be logged and the
LabOrder will not be processed.
-RAD,OTH:
In the OnBeforeMatch method of the Streamlet class, if FillerId is null, it
will be defaulted to the Result ExternalId. If FillerId, PlacerId,
ExternalId, and Result.ExternalId are all null, an error will be logged and
the Order will not be processed.

Viewer cache:
For LabOrders only, if FillerId is null and Result.ResultType = "AT", then
FillerId will be defaulted to PlacerId. Also for LabOrders only, the stored
value for FillerId in the Viewer Cache is required to be unique. If an
inbound LabOrder.FillerId matches one already in the Viewer Cache (if the
same patient record has been loaded multiple times, for example), the
inbound value is made unique by appending "x[OEORDId]" to it, where
"[OEORDId]" is the ID of the parent OEOrder to the OEOrdItem that the
LabOrder is stored as.

HL7: ORC-3.1 : FillerOrderNumber.EntityIdentifier
HL7: OBR-3.1 : FillerOrderNumber.EntityIdentifier
VIEWERLIB: User.HS.OEOrdItem(OEORIFillerNo)
VIEWERLIB: User.HS.OEOrdItem(OEORILabEpisodeNo)
Property methods: FillerIdDisplayToLogical(), FillerIdGet(), FillerIdIsValid(), FillerIdLogicalToDisplay(), FillerIdLogicalToOdbc(), FillerIdNormalize(), FillerIdSet()
property Frequency as HS.SDA3.CodeTableDetail.Frequency;
How often (e.g. Code=QID, Desc=QID, Factor=4)
QID is Latin, meaning 4x a day. BID means 2x day, etc.

HL7ToSDA3:
Though TQ1-3 is a repeating field, HL7ToSDA3 will only parse the first
non-null instance.

Viewer cache:
If the Order contains at least 1 DosageStep in the DosageSteps property,
and if the first DosageStep in that list has a Frequency, then that
Frequency will override this one in the Viewer Cache.

HL7: TQ1-3 : RepeatPattern
SDATableName=Frequency, ViewerClass=User.HS.PHCFreq
VIEWERLIB: User.HS.OEOrdItem(OEORIPHFreqDR)

.Code
HL7: TQ1-3.1.1 : RepeatPattern.RepeatPatternCode.Identifier
VIEWERLIB: User.HS.PHCFreq(PHCFRCode)
.Description
HL7: TQ1-3.1.2 : RepeatPattern.RepeatPatternCode.Text
VIEWERLIB: User.HS.PHCFreq(PHCFRDesc1)
.Factor
HL7: TQ1-3.5 : RepeatPattern.PeriodQuantity
VIEWERLIB: User.HS.PHCFreq(PHCFRFactor)
Property methods: FrequencyGet(), FrequencyGetObject(), FrequencyGetObjectId(), FrequencyGetSwizzled(), FrequencyIsEmpty(), FrequencyIsValid(), FrequencyNewObject(), FrequencySet(), FrequencySetObject(), FrequencySetObjectId(), FrequencyUnSwizzle()
property FromTime as HS.SDA3.TimeStamp;
Start date and time of the Order

HL7ToSDA3:
FromTime is parsed from (in order of precedence) TQ1-7.1, RXE-1.4,
OBR-27.4, OBR-6.1, or ORC-7.4. Though ORC-7 is a repeating field, HL7ToSDA3
only parses the first non-null instance. OBR-27 is also a repeating field,
and HL7ToSDA3 parses every non-null instance of it. The last non-null
instance of StartDateTime.Time in OBR-27 is the one that takes precedence.
Note that an RDE_O11 message may contain TQ1 segments in two different
places. HL7ToSDA3 parses the one following the RXE segment.

Streamlet cache:
For each type of Order, in the OnValidate method of the Streamlet class, if
FromTime is null, it is defaulted to EnteredOn. Then, if the Order has a
Result and FromTime is still null, it is defaulted to Result.ResultTime.
Finally, if the Order has a Result and FromTime is still null, an error
will be logged and the Order will not be saved.

Viewer Cache:
If the Order contains at least 1 DosageStep in the DosageSteps property,
and if the first DosageStep in that list has a FromTime, then that FromTime
will override this one in the Viewer Cache.

HL7: ORC-7.4.1 : QuantityTiming.StartDateTime.Time
HL7: OBR-6.1 : RequestedDateTime.Time
HL7: OBR-27.4.1 : QuantityTiming.StartDateTime.Time
HL7: RXE-1.4.1 : QuantityTiming.StartDateTime.Time
HL7: TQ1-7.1 : StartDateTime.Time
VIEWERLIB: User.HS.OEOrdItem(OEORISttDat) + User.HS.OEOrdItem(OEORISttTim)
Property methods: FromTimeDisplayToLogical(), FromTimeGet(), FromTimeIsValid(), FromTimeLogicalToDisplay(), FromTimeLogicalToTimeStamp(), FromTimeNormalize(), FromTimeOdbcToLogical(), FromTimeSet()
property GroupAssigningAuthority as %String;
HL7ToSDA3:
GroupAssigningAuthority is composed of subfields 2, 3, and 4 concatenated
together as "[.2]^[.3]^[.4]", but only if at least one of these is not
null.

HL7: ORC-4.2: PlacerGroupNumber.NamespaceID
HL7: ORC-4.3: PlacerGroupNumber.UniversalID
HL7: ORC-4.4: PlacerGroupNumber.UniversalIDType
VIEWERLIB: Not stored
Property methods: GroupAssigningAuthorityDisplayToLogical(), GroupAssigningAuthorityGet(), GroupAssigningAuthorityIsValid(), GroupAssigningAuthorityLogicalToDisplay(), GroupAssigningAuthorityLogicalToOdbc(), GroupAssigningAuthorityNormalize(), GroupAssigningAuthoritySet()
property GroupId as %String;
If this item was ordered as part of a group, this is the identifier of that
group. The SDA2-to-SDA3 transform populates this field with the SDA2
ExternalId property.

HL7: ORC-4.1 : PlacerGroupNumber.EntityIdentifier
VIEWERLIB: User.HS.OEOrdItem(OEORILab1)
Property methods: GroupIdDisplayToLogical(), GroupIdGet(), GroupIdIsValid(), GroupIdLogicalToDisplay(), GroupIdLogicalToOdbc(), GroupIdNormalize(), GroupIdSet()
property OrderCategory as HS.SDA3.CodeTableDetail.OrderCategory;
Can be used to group orders in the Clinical Viewer.

HL7ToSDA3:
OBR-24 is parsed to the OrderCategory Code. HL7ToSDA3 does not set the
Description. The parsed value is converted to uppercase in the SDA.

Streamlet cache:
For all Order types, in the OnValidate method of the Streamlet class, if
the Order has an OrderCategory, then the InfoSubType of the streamlet is
set to the OrderCategory Code, converted to uppercase.

Viewer cache:
The OrderCategory is stored as a property of the ARCItmMast (OrderItem),
which is itself a property of the OEOrderItem (Order).

HL7: OBR-24 : DiagnosticServSectID
SDATableName=OrderCategory, ViewerClass=User.HS.ARCItemCat
VIEWERLIB: User.HS.ARCItmMast(ARCIMItemCatDR)
Property methods: OrderCategoryGet(), OrderCategoryGetObject(), OrderCategoryGetObjectId(), OrderCategoryGetSwizzled(), OrderCategoryIsEmpty(), OrderCategoryIsValid(), OrderCategoryNewObject(), OrderCategorySet(), OrderCategorySetObject(), OrderCategorySetObjectId(), OrderCategoryUnSwizzle()
property OrderGroup as %String;
This is a way to group related Orders together, such as a prescription
chain.

VIEWERLIB: User.HS.OEOrdItem(OEORIItemGroup)
Property methods: OrderGroupDisplayToLogical(), OrderGroupGet(), OrderGroupIsValid(), OrderGroupLogicalToDisplay(), OrderGroupLogicalToOdbc(), OrderGroupNormalize(), OrderGroupSet()
property OrderItem as HS.SDA3.CodeTableDetail.Order;
What was ordered

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

Streamlet cache:
For Medications and Vaccinations, in the OnBeforeMatch method of the
Streamlet class, if the Order has no OrderItem but does have a DrugProduct,
then an OrderItem will be defaulted in with Code, Description, and
SDACodingStandard copied from the DrugProduct. For all types of Orders (and
for Medications and Vaccinations, following this defaulting), if the Order
has no OrderItem and does not match exactly 1 other Order of the same type
in the same Encounter on PlacerId (ALPHAUP collated), an error will be
logged and the Order will not be processed. In the OnValidate method, if
the Order does not have an OrderItem (if it was deleted in an update, for
example), an error will be logged and the Order will not be saved.

HL7: OBR-4 : UniversalServiceIdentifier
SDATableName=Order, ViewerClass=User.HS.ARCItmMast
VIEWERLIB: User.HS.OEOrdItem(OEORIItmMastDR)

.Code
Viewer cache:
TRName is for text results only.
HL7: OBR-4.1 : UniversalServiceIdentifier.Identifier
VIEWERLIB: User.HS.ARCItmMast(ARCIMCode)
VIEWERLIB: User.HS.OETextResult(TRName)
.Description
HL7: OBR-4.2 : UniversalServiceIdentifier.Text
VIEWERLIB: User.HS.ARCItmMast(ARCIMDesc)
.SDACodingStandard
HL7: OBR-4.3 : UniversalServiceIdentifier.NameofCodingSystem
VIEWERLIB: Not stored
.CodeSystemVersionId
HL7: OBR-4.7 : UniversalServiceIdentifier.CodingSystemVersionID
VIEWERLIB: Not stored
.PriorCodes
HL7ToSDA3:
In addition to subfield 1 or 2 not being null, if subfield 4 or 5 is not
null, then subfields 4, 5, 6, and 8 will be parsed into the Code,
Description, CodeSystem, and CodeSystemVersionId, respectively, of a
PriorCode in the list of PriorCodes. In this case, the PriorCode Type is
set to "A".
HL7: OBR-4.4 : UniversalServiceIdentifier.AlternateIdentifier
HL7: OBR-4.5 : UniversalServiceIdentifier.AlternateText
HL7: OBR-4.6 : UniversalServiceIdentifier.NameofAlternateCodingSystem
HL7: OBR-4.8 : UniversalServiceIdentifier.AlternateCodingSystemVersionID
VIEWERLIB: Not stored
.OriginalText
HL7: OBR-4.9 : UniversalServiceIdentifier.OriginalText
VIEWERLIB: Not stored
Property methods: OrderItemGet(), OrderItemGetObject(), OrderItemGetObjectId(), OrderItemGetSwizzled(), OrderItemIsEmpty(), OrderItemIsValid(), OrderItemNewObject(), OrderItemSet(), OrderItemSetObject(), OrderItemSetObjectId(), OrderItemUnSwizzle()
property OrderQuantity as %String;
Number of items ordered

HL7ToSDA3:
OrderQuantity is parsed from (in order of precendence) TQ1-2.1, RXE-1.1.1,
OBR-27.1.1, or ORC-7.1.1. Though ORC-7 is a repeating field, HL7ToSDA3 only
parses the first non-null instance. OBR-27 is also a repeating field, and
HL7ToSDA3 parses every non-null instance of it. The last non-null instance
of Quantity in OBR-27 is the one that takes precedence. Note that an
RDE_O11 message may contain TQ1 segments in two different places. HL7ToSDA3
parses the one following the RXE segment.

HL7: ORC-7.1.1 : QuantityTiming.Quantity.Quantity
HL7: OBR-27.1.1 : QuantityTiming.Quantity.Quantity
HL7: RXE-1.1.1 : QuantityTiming.Quantity.Quantity
HL7: TQ1-2.1 : Quantity.Quantity
VIEWERLIB: User.HS.OEOrdItem(OEORIQty)
Property methods: OrderQuantityDisplayToLogical(), OrderQuantityGet(), OrderQuantityIsValid(), OrderQuantityLogicalToDisplay(), OrderQuantityLogicalToOdbc(), OrderQuantityNormalize(), OrderQuantitySet()
property OrderedBy as HS.SDA3.CodeTableDetail.CareProvider;
Who placed the order

HL7ToSDA3:
OrderedBy is parsed from (in order of precendence) OBR-16, RXO-14, RXE-13,
or ORC-12 and -24. Though each of these fields is repeating, for each one
except ORC-24, HL7ToSDA3 will only parse the first non-null instance. For
ORC-24, the instance corresponding to the first non-null instance of ORC-12
will be parsed. ORC-12 and -24 are used in combination to set the
provider's Name and Address in the SDA. Every other field only sets the
Name. For Adress.City, .State, .Zip, .Country, and .County as well as NameTypeCode
and IdentifierTypeCode, only the Code is parsed. HL7ToSDA3 does not set the
Description. Note that an RDE_O11 message technically can contain both an
RXO segment and an RXE, however HL7ToSDA3 does not parse the RXO segment
from an RDE message.

HL7: ORC-12 : OrderingProvider
HL7: ORC-24 : OrderingProviderAddress
HL7: RXE-13 : OrderingProvidersDEANumber
HL7: RXO-14 : OrderingProvidersDEANumber
HL7: OBR-16 : OrderingProvider
SDATableName=CareProvider, ViewerClass=User.HS.CTCareProv
VIEWERLIB: User.HS.OEOrdItem(OEORIDoctorDR)

.Code
HL7: ORC-12.1 : OrderingProvider.IDNumber
HL7: RXE-13.1 : OrderingProvidersDEANumber.IDNumber
HL7: RXO-14.1 : OrderingProvidersDEANumber.IDNumber
HL7: OBR-16.1 : OrderingProvider.IDNumber
VIEWERLIB: User.HS.CTCareProv(CTPCPCode)
.Description
HL7ToSDA3:
The family and given names are concatenated together as "[Family], [Given]"
to make the Description.
HL7: ORC-12.2.1 : OrderingProvider.FamilyName.Surname
HL7: ORC-12.3 : OrderingProvider.GivenName
HL7: RXE-13.2.1 : OrderingProvidersDEANumber.FamilyName.Surname
HL7: RXE-13.3 : OrderingProvidersDEANumber.GivenName
HL7: RXO-14.2.1 : OrderingProvidersDEANumber.FamilyName.Surname
HL7: RXO-14.3 : OrderingProvidersDEANumber.GivenName
HL7: OBR-16.2.1 : OrderingProvider.FamilyName.Surname
HL7: OBR-16.3 : OrderingProvider.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPDesc)
.SDACodingStandard
HL7: ORC-12.9 : OrderingProvider.AssigningAuthority
HL7: RXE-13.9 : OrderingProvidersDEANumber.AssigningAuthority
HL7: RXO-14.9 : OrderingProvidersDEANumber.AssigningAuthority
HL7: OBR-16.9 : OrderingProvider.AssigningAuthority
VIEWERLIB: Not stored
.Name.FamilyName
HL7: ORC-12.2.1 : OrderingProvider.FamilyName.Surname
HL7: RXE-13.2.1 : OrderingProvidersDEANumber.FamilyName.Surname
HL7: RXO-14.2.1 : OrderingProvidersDEANumber.FamilyName.Surname
HL7: OBR-16.2.1 : OrderingProvider.FamilyName.Surname
VIEWERLIB: User.HS.CTCareProv(CTPCPSurname)
.Name.GivenName
HL7: ORC-12.3 : OrderingProvider.GivenName
HL7: RXE-13.3 : OrderingProvidersDEANumber.GivenName
HL7: RXO-14.3 : OrderingProvidersDEANumber.GivenName
HL7: OBR-16.3 : OrderingProvider.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPFirstName)
.Name.MiddleName
HL7: ORC-12.4 : OrderingProvider.MiddleName
HL7: RXE-13.4 : OrderingProvidersDEANumber.MiddleName
HL7: RXO-14.4 : OrderingProvidersDEANumber.MiddleName
HL7: OBR-16.4 : OrderingProvider.MiddleName
VIEWERLIB: User.HS.CTCareProv(CTPCPOtherName)
.Name.NamePrefix
HL7: ORC-12.6 : OrderingProvider.NamePrefix
HL7: RXE-13.6 : OrderingProvidersDEANumber.NamePrefix
HL7: RXO-14.6 : OrderingProvidersDEANumber.NamePrefix
HL7: OBR-16.6 : OrderingProvider.NamePrefix
VIEWERLIB: User.HS.CTCareProv(CTPCPTitle)
.Address.Street
HL7ToSDA3:
If ORC-24.2 is not null, Street will be parsed as "[.1.1]; [.2]". Otherwise
Street will simply be parsed from ORC-24.1.1.
HL7: ORC-24.1.1 : OrderingProviderAddress.StreetAddress.StreetorMailingAddress
HL7: ORC-24.2 : OrderingProviderAddress.OtherDesignation
VIEWERLIB: User.HS.CTCareProv(CTPCPStName)
.Address.City
HL7: ORC-24.3 : OrderingProviderAddress.City
VIEWERLIB: User.HS.CTCareProv(CTPCPCityDR)
.Address.State
HL7: ORC-24.4 : OrderingProviderAddress.StateorProvince
VIEWERLIB: Not stored
.Address.Zip
HL7: ORC-24.5 : OrderingProviderAddress.ZiporPostalCode
VIEWERLIB: User.HS.CTCareProv(CTPCPZipDR)
.Address.Country
HL7: ORC-24.6 : OrderingProviderAddress.Country
VIEWERLIB: Not stored
.Address.County
HL7: ORC-24.9 : OrderingProviderAddress.CountyParishCode
VIEWERLIB: Not stored
.NameTypeCode
HL7: OBR-16.10 : OrderingProvider.NameTypeCode
VIEWERLIB: Not stored
.IdentifierTypeCode
HL7: OBR-16.13 : OrderingProvider.IdentifierTypeCode
VIEWERLIB: Not stored
Property methods: OrderedByGet(), OrderedByGetObject(), OrderedByGetObjectId(), OrderedByGetSwizzled(), OrderedByIsEmpty(), OrderedByIsValid(), OrderedByNewObject(), OrderedBySet(), OrderedBySetObject(), OrderedBySetObjectId(), OrderedByUnSwizzle()
property PlacerAssigningAuthority as %String (MAXLEN = 220);
The namespace from which the ID is assigned to the order when it was placed

HL7ToSDA3:
OBR-2 will be used if a value can be parsed from it, else ORC-2 will be
used. In either case, PlacerAssigningAuthority is composed of subfields 2,
3, and 4 concatenated together as "[.2]^[.3]^[.4]", but only if at least
one of these is not null.

HL7: ORC-2.2 : PlacerOrderNumber.NamespaceID
HL7: ORC-2.3 : PlacerOrderNumber.UniversalID
HL7: ORC-2.4 : PlacerOrderNumber.UniversalIDType
HL7: OBR-2.2 : PlacerOrderNumber.NamespaceID
HL7: OBR-2.3 : PlacerOrderNumber.UniversalID
HL7: OBR-2.4 : PlacerOrderNumber.UniversalIDType
VIEWERLIB: Not stored
Property methods: PlacerAssigningAuthorityDisplayToLogical(), PlacerAssigningAuthorityGet(), PlacerAssigningAuthorityIsValid(), PlacerAssigningAuthorityLogicalToDisplay(), PlacerAssigningAuthorityLogicalToOdbc(), PlacerAssigningAuthorityNormalize(), PlacerAssigningAuthoritySet()
property PlacerId as %String (MAXLEN = 220);
The ID assigned to the order when it was placed

HL7ToSDA3:
OBR-3.1 will be used if present, else ORC-3.1 will be used.

Streamlet cache:
The processing the PlacerId undergoes in the Streamlet Cache is dependent
on the type of Order being processed:
-LAB:
In the OnBeforeMatch method of the Streamlet class, if PlacerId is null, it
is defaulted to ExternalId. If the PlacerId, FillerId, ExternalId, and
Result.ExternalId are all null, an error will be logged and the LabOrder
will not be processed. If the LabOrder has no OrderItem and does not match
exactly 1 other LabOrder in the same Encounter on PlacerId (ALPHAUP
collated), an error will be logged and the LabOrder will not be processed.
-RAD,OTH:
In the OnBeforeMatch method of the Streamlet class, if PlacerId is null, it
is defaulted to ExternalId, then to FillerId, which itself may have been
defaulted to the Result ExternalId. If PlacerId, FillerId, ExternalId and
Result.ExternalId are all null, an error will be logged and the Order will
not be processed. If the Order has no OrderItem and does not match exactly
1 other Order of the same type in the same Encounter on PlacerId (ALPHAUP
collated), an error will be logged and the Order will not be processed.
-MED,VXU:
In the OnBeforeMatch method of the Streamlet class, if PlacerId is null, it
is defaulted to ExternalId, then to FillerId. If the Order has no OrderItem
or DrugProduct and does not match exactly 1 other Order of the same type in
the same Encounter on PlacerId (ALPHAUP collated), an error will be logged
and the Order will not be processed.

Viewer cache:
For LabOrders only, if FillerId is null and Result.ResultType = "AT", then
FillerId will be defaulted to PlacerId.

HL7: ORC-2.1 : PlacerOrderNumber.EntityIdentifier
HL7: OBR-2.1 : PlacerOrderNumber.EntityIdentifier
VIEWERLIB: User.HS.OEOrdItem(OEORIPlacerNo)
Property methods: PlacerIdDisplayToLogical(), PlacerIdGet(), PlacerIdIsValid(), PlacerIdLogicalToDisplay(), PlacerIdLogicalToOdbc(), PlacerIdNormalize(), PlacerIdSet()
property Priority as HS.SDA3.CodeTableDetail.Priority;
The Priority of the Order

HL7ToSDA3:
Priority is parsed from (in order of precendence) TQ1-9, RXE-1.6, OBR-27.6,
OBR-5, or ORC-7.6. TQ1-9 may set the Code, Description, and
SDACodingStandard. Every other field only sets the Code. Though TQ1-9 and
ORC-7 are repeating fields, HL7ToSDA3 only parses the first non-null
instance of each. OBR-27 is also a repeating field, and HL7ToSDA3 parses
every non-null instance of it. The last non-null instance of Priority in
OBR-27 is the one that takes precedence. Note that an RDE_O11 message may
contain TQ1 segments in two different places. HL7ToSDA3 parses the one
following the RXE segment.

Streamlet cache:
For each type of Order, in the OnValidate method of the Streamlet class, if
the Order contains no Priority, one is defaulted in with Code="N" and
Description="Normal".

HL7: ORC-7.6 : QuantityTiming.Priority
HL7: OBR-5 : PriorityOBR
HL7: OBR-27.6 : QuantityTiming.Priority
HL7: RXE-1.6 : QuantityTiming.Priority
HL7: TQ1-9 : Priority
SDATableName=Priority, ViewerClass=User.HS.OECPriority
VIEWERLIB: User.HS.OEOrdItem(OEORIPriorityDR)

.Code
HL7: ORC-7.6 : QuantityTiming.Priority
HL7: OBR-5 : PriorityOBR
HL7: OBR-27.6 : QuantityTiming.Priority
HL7: RXE-1.6 : QuantityTiming.Priority
HL7: TQ1-9.1 : Priority.Identifier
VIEWERLIB: User.HS.OECPriority(OECPRCode)
.Description
HL7: TQ1-9.2 : Priority.Text
VIEWERLIB: User.HS.OECPriority(OECPRDesc)
.SDACodingStandard
HL7: TQ1-9.3 : Priority.NameofCodingSystem
VIEWERLIB: Not stored
Property methods: PriorityGet(), PriorityGetObject(), PriorityGetObjectId(), PriorityGetSwizzled(), PriorityIsEmpty(), PriorityIsValid(), PriorityNewObject(), PrioritySet(), PrioritySetObject(), PrioritySetObjectId(), PriorityUnSwizzle()
property ReassessmentTime as HS.SDA3.TimeStamp;
If the Order is not final, this is the date/time when it should be reviewed
and perhaps finalized.

VIEWERLIB: User.HS.OEOrdItem(OEORIReassessmentDate) + User.HS.OEOrdItem(OEORIReassessmentTime)
Property methods: ReassessmentTimeDisplayToLogical(), ReassessmentTimeGet(), ReassessmentTimeIsValid(), ReassessmentTimeLogicalToDisplay(), ReassessmentTimeLogicalToTimeStamp(), ReassessmentTimeNormalize(), ReassessmentTimeOdbcToLogical(), ReassessmentTimeSet()
property ReceivingLocation as HS.SDA3.CodeTableDetail.HealthCareFacility;
Location or facility receiving/performing the order

Viewer cache:
If no Organization is given, one will be defaulted in with Code and
Description = SendingFacility of the SDA Container.

SDATableName=HealthCareFacility, ViewerClass=User.HS.CTLoc
VIEWERLIB: User.HS.OEOrdItem(OEORIRecDepDR)

.Organization
SDATableName=Organization, ViewerClass=User.HS.CTHospital
VIEWERLIB: User.HS.CTLoc(CTLOCHospitalDR)
Property methods: ReceivingLocationGet(), ReceivingLocationGetObject(), ReceivingLocationGetObjectId(), ReceivingLocationGetSwizzled(), ReceivingLocationIsEmpty(), ReceivingLocationIsValid(), ReceivingLocationNewObject(), ReceivingLocationSet(), ReceivingLocationSetObject(), ReceivingLocationSetObjectId(), ReceivingLocationUnSwizzle()
property ResultCopiesTo as list of HS.SDA3.CodeTableDetail.CareProvider;
Who to send copies of results to

HL7ToSDA3:
OBR-28 is a repeating field, and HL7ToSDA3 will parse each instance with a
non-null value in subfield 1.

HL7: OBR-28 : ResultCopiesTo
SDATableName=CareProvider, ViewerClass=User.HS.CTCareProv
VIEWERLIB: Not stored

.Code
HL7: OBR-28.1 : ResultCopiesTo.Code
.Description
HL7ToSDA3:
The family and given names are concatenated together as "[Family], [Given]"
to make the Description.
HL7: OBR-28.2.1 : ResultCopiesTo.FamilyName.Surname
HL7: OBR-28.3 : ResultCopiesTo.GivenName
.SDACodingStandard
HL7: OBR-28.9 : ResultCopiesTo.AssigningAuthority
.Name.FamilyName
HL7: OBR-28.2.1 : ResultCopiesTo.FamilyName.Surname
.Name.GivenName
HL7: OBR-28.3 : ResultCopiesTo.GivenName
.Name.NamePrefix
HL7: OBR-28.6 : ResultCopiesTo.Prefix
.Name.NameSuffix
HL7: OBR-28.7 : ResultCopiesTo.Degree
Property methods: ResultCopiesToBuildValueArray(), ResultCopiesToCollectionToDisplay(), ResultCopiesToCollectionToOdbc(), ResultCopiesToDisplayToCollection(), ResultCopiesToGet(), ResultCopiesToGetObject(), ResultCopiesToGetObjectId(), ResultCopiesToGetSwizzled(), ResultCopiesToIsValid(), ResultCopiesToOdbcToCollection(), ResultCopiesToSet(), ResultCopiesToSetObject(), ResultCopiesToSetObjectId()
property Specimen as %String (MAXLEN = 220);
Specimen code or description as a string
Not to be confused with the Specimens property of LabOrder, RadOrder, and
OtherOrder, which is of type List of HS.SDA3.Specimen.

HL7ToSDA3:
OBR-15.1.2 will be used if not null, else OBR-15.1.1 will be used.

Viewer cache:
Specimen is inserted into the Viewer Cache as a CTSpecimen with SPECCode
and SPECDesc=[Specimen]. The CTSpecimen is the linked to the ARCItmMast
(OrderItem) via an ARCItemSpecimen. Specimen is also inserted as an
OEOrdSpecimen (with SPECCode=[Specimen]) that is linked to the OEOrdItem
(Order). Note that backslash ("\") is a reserved character for the
CTSpecimen table, so Specimen should not contain a backslash.

HL7: OBR-15 : SpecimenSource
SDATableName=None, ViewerClass=User.HS.CTSpecimen
VIEWERLIB: User.HS.OEOrdSpecimen(SPECCode)
VIEWERLIB: User.HS.CTSpecimen(SPECCode) + User.HS.CTSpecimen(SPECDesc)
Property methods: SpecimenDisplayToLogical(), SpecimenGet(), SpecimenIsValid(), SpecimenLogicalToDisplay(), SpecimenLogicalToOdbc(), SpecimenNormalize(), SpecimenSet()
property SpecimenCollectedTime as HS.SDA3.TimeStamp;
Date/time the specimen was collected

HL7ToSDA3:
OBR-7.1 and SPM-17.1 represent the same value and therefore should contain
the same value if both are present, however HealthShare does not enforce
this. SPM-17.1 is parsed to Specimen.FromTime.

Viewer cache:
OEORIEpisArriveDate and OEORIEpisArriveTime are only set for Lab, Rad, and
Other Orders, not Medications or Vaccinations. SPECDate and SPECTime are
only set if the Order contains a Specimen (the string property, not an
HS.SDA3.Specimen). The properties of lab.HS.EPVisitNumber and
EPVisitTestSet are set for atomic results only. Note that while
VISTSTimeOfCollection is a %Time, EPVISTimeOfCollection is not. It is a
%String value containing the time as a number of minutes since midnight.

HL7: OBR-7.1 : ObservationDateTime.Time
VIEWERLIB: User.HS.OEOrdItem(OEORIEpisArriveDate) + User.HS.OEOrdItem(OEORIEpisArriveTime)
VIEWERLIB: User.HS.OEOrdSpecimen(SPECDate) + User.HS.OEOrdSpecimen(SPECTime)
VIEWERLIB: lab.HS.EPVisitNumber(EPVISDateOfCollection) + lab.HS.EPVisitNumber(EPVISTimeOfCollection)
VIEWERLIB: lab.HS.EPVisitTestSet(VISTSDateOfCollection) + lab.HS.EPVisitTestSet(VISTSDateOfCollection)
Property methods: SpecimenCollectedTimeDisplayToLogical(), SpecimenCollectedTimeGet(), SpecimenCollectedTimeIsValid(), SpecimenCollectedTimeLogicalToDisplay(), SpecimenCollectedTimeLogicalToTimeStamp(), SpecimenCollectedTimeNormalize(), SpecimenCollectedTimeOdbcToLogical(), SpecimenCollectedTimeSet()
property SpecimenReceivedTime as HS.SDA3.TimeStamp;
Date/time the specimen was received

Viewer cache:
OEORILabReceiveDate and OEORILabReceiveTime are only set for Lab, Rad, and
Other Orders, not Medications or Vaccinations. The properties of
lab.HS.EPVisitNumber are set for atomic results only. Note that
EPVISTimeOfReceiving is not a %Time but rather a %String value containing
the time as a number of minutes since midnight.

HL7: OBR-14.1 : SpecimenReceivedDateTime.Time
VIEWERLIB: User.HS.OEOrdItem(OEORILabReceiveDate) + User.HS.OEOrdItem(OEORILabReceiveTime)
VIEWERLIB: lab.HS.EPVisitNumber(EPVISDateOfReceiving) + lab.HS.EPVisitNumber(EPVISTimeOfReceiving)
Property methods: SpecimenReceivedTimeDisplayToLogical(), SpecimenReceivedTimeGet(), SpecimenReceivedTimeIsValid(), SpecimenReceivedTimeLogicalToDisplay(), SpecimenReceivedTimeLogicalToTimeStamp(), SpecimenReceivedTimeNormalize(), SpecimenReceivedTimeOdbcToLogical(), SpecimenReceivedTimeSet()
property Status as %String (MAXLEN = 32000);
The current status of the order

HL7ToSDA3:
The following values are mapped in the HL7 to SDA3 parsing:
DC->D, CA->C, RP->R, HD->H, SC->IP, CM->E, [Other]->unchanged

Streamlet cache:
For any type of Order, in the OnValidate method of the streamlet class, if
Status is null, it is defaulted to "V" for "Verified". Then, for Orders
that can have results (LabOrder, RadOrder, OtherOrder), if the Order has a
Result, Status is set to "E" for "Executed", unless it is "D", "C", "R", or
"H" (for Discontinued, Cancelled, Replaced, or On Hold, respectively). The
reasoning behind setting the Status to "E" is that if the Order has a
Result, then it must have been executed. The reasoning behind the
exceptions to this is that those particular statuses may have been entered
after the Result was submitted. Also, for any type of Order, when Orders of
of that type are inactivated with ActionCode="I", the Status of each will
be set to "I".

Viewer cache:
Status is stored in the Viewer Cache as an OECOrderStatus with OSTATCode
matching Status, ALPHAUP collated. If no such entry in OECOrderStatus
exists, Status will be stored as V/Verified in the Viewer Cache only and an
alert logged in the Ensemble Event Log. Note that the OECOrderStatus table
is loaded from the SITE- or HS-Default-OrderStatus.txt file at the time the
Access Gateway is reset.

HL7: ORC-5 : OrderStatus
SDATableName=None, ViewerClass=User.HS.OECOrderStatus
VIEWERLIB: User.HS.OEOrdItem(OEORIItemStatDR)
Property methods: StatusDisplayToLogical(), StatusGet(), StatusIsValid(), StatusLogicalToDisplay(), StatusLogicalToOdbc(), StatusNormalize(), StatusSet()
property TextInstruction as %String);
Text instructions or directions, e.g. "After food", or if Duration etc.
isn't coded, "Take 3 twice a day"
Length subject to the total streamlet size limit - 3,000,000

HL7ToSDA3:
TextInstruction is parsed from (in order of precendence) TQ1-11, RXE-1.8,
OBR-27.8, or ORC-7.8. Though ORC-7 is a repeating field, HL7ToSDA3 only
parses the first non-null instance. OBR-27 is also a repeating field, and
HL7ToSDA3 parses every non-null instance of it. The last non-null instance
of Text in OBR-27 is the one that takes precendence. Note that an RDE_O11
message may contain TQ1 segments in two different places. HL7ToSDA3 parses
the one following the RXE segment.

Viewer cache:
If the Order contains at least 1 DosageStep in the DosageSteps property,
and if the first DosageStep in that list has a TextInstruction, then that
TextInstruction will override this one in the Viewer Cache.

HL7: ORC-7.8 : QuantityTiming.Text
HL7: OBR-27.8 : QuantityTiming.Text
HL7: RXE-1.8 : QuantityTimingText
HL7: TQ1-11 : TextInstruction
VIEWERLIB: User.HS.OEOrdItem(OEORIDepProcNotes)
Property methods: TextInstructionDisplayToLogical(), TextInstructionGet(), TextInstructionIsValid(), TextInstructionLogicalToDisplay(), TextInstructionLogicalToOdbc(), TextInstructionNormalize(), TextInstructionSet()
property ToTime as HS.SDA3.TimeStamp;
End date and time of the Order

HL7ToSDA3:
ToTime is parsed from (in order of precedence) TQ1-8, RXE-1.5, OBR-27.5,
or ORC-7.5. Though ORC-7 is a repeating field, HL7ToSDA3 only parses the
first non-null instance. OBR-27 is also a repeating field, and HL7ToSDA3
parses every non-null instance of it. The last non-null instance of
EndDateTime.Time in OBR-27 is the one that takes precedence. Note that an
RDE_O11 message may contain TQ1 segments in two different places. HL7ToSDA3
parses the one following the RXE segment.

Viewer Cache:
If the Order contains at least 1 DosageStep in the DosageSteps property,
and if the first DosageStep in that list has a ToTime, then that ToTime
will override this one in the Viewer Cache.

HL7: ORC-7.5.1 : QuantityTiming.EndDateTime.Time
HL7: OBR-27.5.1 : QuantityTiming.EndDateTime.Time
HL7: RXE-1.5.1 : QuantityTiming.EndDateTimeTime
HL7: TQ1-8.1 : EndDateTime.Time
VIEWERLIB: User.HS.OEOrdItem(OEORIEndDate) + User.HS.OEOrdItem(OEORIEndTime)
Property methods: ToTimeDisplayToLogical(), ToTimeGet(), ToTimeIsValid(), ToTimeLogicalToDisplay(), ToTimeLogicalToTimeStamp(), ToTimeNormalize(), ToTimeOdbcToLogical(), ToTimeSet()
property VerifiedBy as HS.SDA3.CodeTableDetail.CareProvider;
VerifiedBy (CareProvider)

HL7ToSDA3:
OBR-32 will be used if present, else the first non-null instance of ORC-11
will be used, if there is one.

HL7: ORC-11 : VerifiedBy
HL7: OBR-32 : PrincipalResultInterpreter
SDATableName=CareProvider, ViewerClass=User.HS.CTCareProv
VIEWERLIB: User.HS.OEOrdItem(OEORIAuthoriseClinicianDR)

.Code
HL7: ORC-11.1 : VerifiedBy.IDNumber
HL7: OBR-32.1.1 : PrincipalResultInterpreter.Name.IDNumber
VIEWERLIB: User.HS.CTCareProv(CTPCPCode)
.Description
HL7ToSDA3:
For both fields, the given and family names are concatenated together as
"[Family], [Given]" to make the Description.
HL7: ORC-11.2.1 : VerifiedBy.FamilyName.Surname
HL7: ORC-11.3 : VerifiedBy.GivenName
HL7: OBR-32.1.2 : PrincipalResultInterpreter.Name.FamilyName
HL7: OBR-32.1.3 : PrincipalResultInterpreter.Name.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPDesc)
.SDACodingStandard
HL7: ORC-11.9 : VerifiedBy.AssigningAuthority
HL7: OBR-32.1.9 : PrincipalResultInterpreter.Name.AssigningAuthorityNamespaceID
VIEWERLIB: Not stored
.Name.FamilyName
HL7: ORC-11.2.1 : VerifiedBy.FamilyName.Surname
HL7: OBR-32.1.2 : PrincipalResultInterpreter.Name.FamilyName
VIEWERLIB: User.HS.CTCareProv(CTPCPSurname)
.Name.GivenName
HL7: ORC-11.3 : VerifiedBy.GivenName
HL7: OBR-32.1.3 : PrincipalResultInterpreter.Name.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPFirstName)
.Name.MiddleName
HL7: ORC-11.4 : VerifiedBy.SecondandFurtherGivenNames
HL7: OBR-32.1.4 : PrincipalResultInterpreter.Name.SecondandFurtherGivenNames
VIEWERLIB: User.HS.CTCareProv(CTPCPOtherName)
.Name.NamePrefix
HL7: ORC-11.6 : VerifiedBy.Prefix
HL7: OBR-32.1.6 : PrincipalResultInterpreter.Name.Prefix
VIEWERLIB: User.HS.CTCareProv(CTPCPTitle)
.Name.NameSuffix
HL7: ORC-11.7 : VerifiedBy.Degree
HL7: OBR-32.1.5 : PrincipalResultInterpreter.Name.Suffix
VIEWERLIB: User.HS.CTCareProv(CTPCPTextTwo)
.Name.ProfessionalSuffix
HL7: OBR-32.1.7 : PrincipalResultInterpreter.Name.Degree
VIEWERLIB: User.HS.CTCareProv(CTPCPTextThree)
Property methods: VerifiedByGet(), VerifiedByGetObject(), VerifiedByGetObjectId(), VerifiedByGetSwizzled(), VerifiedByIsEmpty(), VerifiedByIsValid(), VerifiedByNewObject(), VerifiedBySet(), VerifiedBySetObject(), VerifiedBySetObjectId(), VerifiedByUnSwizzle()
property VerifiedComments as %String);
Verified order comments and notes
Length subject to the total streamlet size limit - 3,000,000

VIEWERLIB: User.HS.OEOrdItem(OEORIAuthComments)
Property methods: VerifiedCommentsDisplayToLogical(), VerifiedCommentsGet(), VerifiedCommentsIsValid(), VerifiedCommentsLogicalToDisplay(), VerifiedCommentsLogicalToOdbc(), VerifiedCommentsNormalize(), VerifiedCommentsSet()

Subclasses

FeedbackOpens in a new tab