Skip to main content

HS.SDA3.Document

serial class HS.SDA3.Document extends HS.SDA3.SuperClass

The logic defining how the DocumentURL, NoteText, FileType, and Stream properties are parsed from an HL7 MDM^T02 message in HL7ToSDA3 is as follows:
  1. If OBX-2 (Value Type) of the first OBX is "RP" (for "Reference Pointer"), then OBX-5.1 (Observation Value.Pointer) of that segment is parsed as DocumentURL. If this segment is followed by anything other than an OBX (ie NTE) the remaining segments will not be parsed. If this segment is followed by additional OBXs (possibly with NTEs mixed in), then all the remaining OBX-5 and NTE-3 values will be parsed as NoteText, with each segment being parsed as a new line.
  2. Else, if OBX-2 of the first OBX is "ED" (for "Encapsulated Data") then OBX-5.3 (Observation Value.Data Subtype) of that segment will be parsed as FileType. All OBX-5.5 (.Data) and NTE-3 values will be parsed (with each segment being parsed as a new line) as the Stream property, after being Base64-encoded if they are not already. HL7ToSDA3 will look at OBX-5.4 (.Encoding) of the first OBX to determine if the data is already Base64-encoded. (OBX-5.4="BASE64" (case-insensitive) -> data is already encoded; else -> data is not encoded)
  3. Else, if the first characters of the first OBX-5.1 are "{\rtf", FileType is set to "RTF", and all of the OBX-5 and NTE-3 values are parsed (with each segment being a new line) as the Stream property, after being Base64-encoded.
  4. Else each OBX-5 and NTE-3 value is parsed as plaintext (with each segment being parsed as a new line) into the NoteText property.

Property Inventory

Properties

property ActionCode as %String;
D = Delete
I = Inactivate All (set Status.Code="UN", Description="Unavailable for patient care")
C = Clear All
Any other value = Add or Update
See the annotation on the superclass property for more information on how
ActionCode is used.

HL7ToSDA3:
Two double quotes ("") in TXA-1 is parsed as ActionCode="I", and four
double quotes ("""") as ActionCode="C". In either case no further parsing
is done on the TXA segment. If the HL7 message is an MDM_T11 (Document
cancel notification), ActionCode will be parsed as "D".

HL7: TXA-1 : SetIDTXA
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 ActionTime as HS.SDA3.TimeStamp;
The time that any action or treatment was instigated.

VIEWERLIB: User.HS.MRNursingNotes(NOTActionTakenDate) + User.HS.MRNursingNotes(NOTActionTakenTime)
Property methods: ActionTimeDisplayToLogical(), ActionTimeGet(), ActionTimeIsValid(), ActionTimeLogicalToDisplay(), ActionTimeLogicalToTimeStamp(), ActionTimeLogicalToXSD(), ActionTimeNormalize(), ActionTimeOdbcToLogical(), ActionTimeSet(), ActionTimeXSDToLogical()
property AuthorizationTime as HS.SDA3.TimeStamp;
The time that the document was authorised.

HL7: TXA-22.15 : AuthenticationPersonTimeStamp.DateTimeActionPerformed
VIEWERLIB: User.HS.MRNursingNotes(NOTDateAuth) + User.HS.MRNursingNotes(NOTTimeAuth)
Property methods: AuthorizationTimeDisplayToLogical(), AuthorizationTimeGet(), AuthorizationTimeIsValid(), AuthorizationTimeLogicalToDisplay(), AuthorizationTimeLogicalToTimeStamp(), AuthorizationTimeLogicalToXSD(), AuthorizationTimeNormalize(), AuthorizationTimeOdbcToLogical(), AuthorizationTimeSet(), AuthorizationTimeXSDToLogical()
property Category as HS.SDA3.CodeTableDetail.DocumentCategory;
A categorization for the type of document referenced. VIEWERLIB: Not stored
Property methods: CategoryGet(), CategoryGetObject(), CategoryGetObjectId(), CategoryGetSwizzled(), CategoryIsEmpty(), CategoryIsValid(), CategoryNewObject(), CategorySet(), CategorySetObject(), CategorySetObjectId(), CategoryUnSwizzle()
property Clinician as HS.SDA3.CodeTableDetail.CareProvider;
The name of the clinician who performed the activity and originated the
Note. This may not be the same as the EnteredBy if the Note was
transcribed.

HL7ToSDA3:
Though TXA-5 is a repeating field, HL7ToSDA3 will only parse the first instance.

HL7: TXA-5 : PrimaryActivityProviderCodeName
SDATableName=CareProvider, ViewerClass=User.HS.CTCareProv
VIEWERLIB: User.HS.MRNursingNotes(NOTNurseIdDR)

.Code
HL7: TXA-5.1 : IDNumber
VIEWERLIB: User.HS.CTCareProv(CTPCPCode)
.Description
The name is formatted as "[Family], [Given]" to make the Description.
HL7: TXA-5.2.1 : PrimaryActivityProviderCodeName.FamilyName.Surname
HL7: TXA-5.3 : PrimaryActivityProviderCodeName.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPDesc)
.SDACodingStandard
HL7: TXA-5.9 : PrimaryActivityProviderCodeName.AssigningAuthority
VIEWERLIB: Not stored
.Name.FamilyName
HL7: TXA-5.2.1 : PrimaryActivityProviderCodeName.FamilyName.Surname
VIEWERLIB: User.HS.CTCareProv(CTPCPSurname)
.Name.GivenName
HL7: TXA-5.3 : PrimaryActivityProviderCodeName.GivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPFirstName)
.Name.MiddleName
HL7: TXA-5.4 : PrimaryActivityProviderCodeName.SecondandFurtherGivenName
VIEWERLIB: User.HS.CTCareProv(CTPCPOtherName)
.Name.NamePrefix
HL7: TXA-5.6 : PrimaryActivityProviderCodeName.Prefix
VIEWERLIB: User.HS.CTCareProv(CTPCPTitle)
.Name.NameSuffix
HL7: TXA-5.5 : PrimaryActivityProviderCodeName.Suffix
VIEWERLIB: User.HS.CTCareProv(CTPCPTextTwo)
.Name.ProfessionalSuffix
HL7: TXA-5.21 : PrimaryActivityProviderCodeName.ProfessionalSuffix
VIEWERLIB: User.HS.CTCareProv(CTPCPTextThree)
Property methods: ClinicianGet(), ClinicianGetObject(), ClinicianGetObjectId(), ClinicianGetSwizzled(), ClinicianIsEmpty(), ClinicianIsValid(), ClinicianNewObject(), ClinicianSet(), ClinicianSetObject(), ClinicianSetObjectId(), ClinicianUnSwizzle()
property DocumentCompletionStatus as HS.SDA3.CodeTableDetail.DocumentCompletionStatus;
This is the status of the creation of the Note, such as Incomplete, In Progress,
or Authenticated. HL7ToSDA3:
TXA-17 is parsed as the Document Completion Status. HL7ToSDA3 does not set the
Description.

HL7: TXA-17 : DocumentCompletionStatus
SDATableName=DocumentCompletionStatus
VIEWERLIB: Not stored
Property methods: DocumentCompletionStatusGet(), DocumentCompletionStatusGetObject(), DocumentCompletionStatusGetObjectId(), DocumentCompletionStatusGetSwizzled(), DocumentCompletionStatusIsEmpty(), DocumentCompletionStatusIsValid(), DocumentCompletionStatusNewObject(), DocumentCompletionStatusSet(), DocumentCompletionStatusSetObject(), DocumentCompletionStatusSetObjectId(), DocumentCompletionStatusUnSwizzle()
property DocumentName as %String (MAXLEN = 220);
The name of the document.

Streamlet cache:
In the OnValidate method of the Streamlet class, if DocumentName is null,
it will be defaulted to DocumentURL, then to FileType.

Viewer cache:
If not null, the DocumentName is what will appear in the Clinical Viewer
in the Document column, that the user may click to see the document.
Otherwise, the first few characters of the NoteText will appear in this
column.

HL7: TXA-16 : UniqueDocumentFileName
VIEWERLIB: User.HS.MRNursingNotes(NOTDocumentName)
Property methods: DocumentNameDisplayToLogical(), DocumentNameGet(), DocumentNameIsValid(), DocumentNameLogicalToDisplay(), DocumentNameLogicalToOdbc(), DocumentNameNormalize(), DocumentNameSet()
property DocumentNumber as %String (MAXLEN = 220);
Used as an external reference ID.

Streamlet cache:
In the OnBeforeMatch method of the Streamlet class, if DocumentNumber is
null, it will be defaulted to the ExternalId.

HL7: TXA-12.1 : UniqueDocumentNumber.EntityIdentifier
VIEWERLIB: User.HS.MRNursingNotes(NOTExternalRef)
Property methods: DocumentNumberDisplayToLogical(), DocumentNumberGet(), DocumentNumberIsValid(), DocumentNumberLogicalToDisplay(), DocumentNumberLogicalToOdbc(), DocumentNumberNormalize(), DocumentNumberSet()
property DocumentTime as HS.SDA3.TimeStamp;
This contains the date of the activity that the document is reporting.
For example, with a Discharge Summary this should be the date/time of the
discharge, while TranscriptionTime would be the date/time the summary was
put together, and AuthorizationTime the date/time when the doctor signed
the summary.

Streamlet cache:
If null, this will be defaulted to TranscriptionTime, then
AuthorizationTime, then EnteredOn, and finally to the current time if all
of those are null.

HL7: TXA-4.1 : ActivityDateTime.Time
VIEWERLIB: User.HS.MRNursingNotes(NOTActivityDate) + User.HS.MRNursingNotes(NOTActivityTime)
Property methods: DocumentTimeDisplayToLogical(), DocumentTimeGet(), DocumentTimeIsValid(), DocumentTimeLogicalToDisplay(), DocumentTimeLogicalToTimeStamp(), DocumentTimeLogicalToXSD(), DocumentTimeNormalize(), DocumentTimeOdbcToLogical(), DocumentTimeSet(), DocumentTimeXSDToLogical()
property DocumentType as HS.SDA3.CodeTableDetail.DocumentType;
HL7ToSDA3:
TXA-2 is parsed to DocumentType.Code. If TXA-2 is "DS", Description is
parsed as "DischargeSummary" so that the Document will appear on the
Discharge Summaries chart in the default Clinical Viewer layout. Otherwise
HL7ToSDA3 does not set the Description.

Streamlet cache:
In the OnValidate method of the Streamlet class, if the Document has a DocumentType, and
DocumentType.Code is not an OID, set InfoSubType to DocumentType.Code, converted to
uppercase. If DocumentType.Code is an OID and DocumentType.Description is present,
set InfoSubType to DocumentType.Description, converted to uppercase.

HL7: TXA-2 : DocumentType
SDATableName=DocumentType, ViewerClass=User.HS.MRCClinNotesType
VIEWERLIB: User.HS.MRNursingNotes(NOTClinNotesTypeDR)
Property methods: DocumentTypeGet(), DocumentTypeGetObject(), DocumentTypeGetObjectId(), DocumentTypeGetSwizzled(), DocumentTypeIsEmpty(), DocumentTypeIsValid(), DocumentTypeNewObject(), DocumentTypeSet(), DocumentTypeSetObject(), DocumentTypeSetObjectId(), DocumentTypeUnSwizzle()
property DocumentURL as %String (MAXLEN = 220);
The full URL where the document can be accessed

HL7ToSDA3:
See class annotation.

Streamlet cache:
In the OnValidate method of the Streamlet class, if the Document does not
have a DocumentURL, NoteText, or Stream and FileType, then an error will be
logged and the streamlet will not be saved. Also, if the DocumentName is
null, it will be defaulted to the DocumentURL, then to the FileType.

HL7: OBX-5.1 : ObservationValue.Pointer
VIEWERLIB: User.HS.MRNursingNotes(NOTDocumentURL)
Property methods: DocumentURLDisplayToLogical(), DocumentURLGet(), DocumentURLIsValid(), DocumentURLLogicalToDisplay(), DocumentURLLogicalToOdbc(), DocumentURLNormalize(), DocumentURLSet()
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.MRNursingNotes(NOTHospitalDR)
Property methods: EnteredAtGet(), EnteredAtGetObject(), EnteredAtGetObjectId(), EnteredAtGetSwizzled(), EnteredAtIsEmpty(), EnteredAtIsValid(), EnteredAtNewObject(), EnteredAtSet(), EnteredAtSetObject(), EnteredAtSetObjectId(), EnteredAtUnSwizzle()
property EnteredBy as HS.SDA3.CodeTableDetail.User;
This is the person who entered the Note, perhaps from a dictation.

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

HL7: TXA-9 : OriginatorCodeName
SDATableName=User, ViewerClass=User.HS.SSUser
VIEWERLIB: User.HS.MRNursingNotes(NOTUserDR)

.Code
HL7: TXA-9.1 : OriginatorCodeName.IDNumber
VIEWERLIB: User.HS.SSUser(SSUSRInitials)
.Description
HL7ToSDA3:
The name is formatted as "[Family], [Given]" to make the Description.
HL7: TXA-9.2.1 : OriginatorCodeName.FamilyName.Surname
HL7: TXA-9.3 : GivenName
VIEWERLIB: User.HS.SSUser(SSUSRName)
.SDACodingStandard
HL7: TXA-9.9 : OriginatorCodeName.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:
In the OnValidate method of the Streamlet class, if EnteredOn is null, it
will be defaulted to the current date/time.

VIEWERLIB: User.HS.MRNursingNotes(NOTDate) + User.HS.MRNursingNotes(NOTTime)
Property methods: EnteredOnDisplayToLogical(), EnteredOnGet(), EnteredOnIsValid(), EnteredOnLogicalToDisplay(), EnteredOnLogicalToTimeStamp(), EnteredOnLogicalToXSD(), EnteredOnNormalize(), EnteredOnOdbcToLogical(), EnteredOnSet(), EnteredOnXSDToLogical()
property Extension as HS.Local.SDA3.DocumentExtension;
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 DocumentNumber is
null, it will be defaulted to ExternalId.

VIEWERLIB: User.HS.MRNursingNotes(NOTExternalId)
Property methods: ExternalIdDisplayToLogical(), ExternalIdGet(), ExternalIdIsValid(), ExternalIdLogicalToDisplay(), ExternalIdLogicalToOdbc(), ExternalIdNormalize(), ExternalIdSet()
property Facilities as list of HS.SDA3.CodeTableDetail.Organization;
List of facilities that have contributed to this document

SDATableName=Organization, ViewerClass=User.HS.CTHospital
VIEWERLIB: User.HS.MRNursingNotes(ChildMRNursingNotesHosp)->User.HS.MRNursingNotesHosp(NOTHospitalDR)
Property methods: FacilitiesBuildValueArray(), FacilitiesCollectionToDisplay(), FacilitiesCollectionToOdbc(), FacilitiesDisplayToCollection(), FacilitiesGet(), FacilitiesGetObject(), FacilitiesGetObjectId(), FacilitiesGetSwizzled(), FacilitiesIsValid(), FacilitiesOdbcToCollection(), FacilitiesSet(), FacilitiesSetObject(), FacilitiesSetObjectId()
property FileType as %String;
The type of data e.g PDF, DOC, RTF, TXT

HL7ToSDA3:
See class annotation.

Streamlet cache:
In the OnValidate method of the Streamlet class, if the Document does not
have a DocumentURL, NoteText, or Stream and FileType, then an error will be
logged and the streamlet will not be saved. Also, if the DocumentName is
null, it will be defaulted to the DocumentURL, then to the FileType.

Viewer cache:
The list of FileTypes that the Clinical Viewer supports for Documents is
contained in the ValidTypes parameter of the websys.Document class.

HL7: OBX-5.3 : ObservationValue.EDDataSubType
VIEWERLIB: User.HS.MRNursingNotes(NOTDocumentDR)->websys.Document(docType)
Property methods: FileTypeDisplayToLogical(), FileTypeGet(), FileTypeIsValid(), FileTypeLogicalToDisplay(), FileTypeLogicalToOdbc(), FileTypeNormalize(), FileTypeSet()
property FormatCode as HS.SDA3.CodeTableDetail.FormatCode;
An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType. VIEWERLIB: Not stored
Property methods: FormatCodeGet(), FormatCodeGetObject(), FormatCodeGetObjectId(), FormatCodeGetSwizzled(), FormatCodeIsEmpty(), FormatCodeIsValid(), FormatCodeNewObject(), FormatCodeSet(), FormatCodeSetObject(), FormatCodeSetObjectId(), FormatCodeUnSwizzle()
property NoteText as %String);
This property is used when the Note is either plain or marked up text e.g
TX, FT, HTML. CRLF-delimited.
Length subject to the total streamlet size limit - 3,000,000

HL7ToSDA3:
See class annotation.

Streamlet cache:
In the OnValidate method of the Streamlet class, if the Document does not
have a DocumentURL, NoteText, or Stream and FileType, then an error will be
logged and the Streamlet will not be saved.

HL7: OBX-5 : ObservationValue
HL7: NTE-3 : Comment
VIEWERLIB: User.HS.MRNursingNotes(NOTNotes)
Property methods: NoteTextDisplayToLogical(), NoteTextGet(), NoteTextIsValid(), NoteTextLogicalToDisplay(), NoteTextLogicalToOdbc(), NoteTextNormalize(), NoteTextSet()
property Status as HS.SDA3.CodeTableDetail.DocumentStatus;
HL7ToSDA3:
TXA-19 is parsed as the Status Code. HL7ToSDA3 does not set the
Description.

Streamlet cache:
In the OnValidate method of the Streamlet class, if the Document has no
Status, one will be defaulted with Code="AV" and Description="Available for
patient care".

HL7: TXA-19 : DocumentAvailabilityStatus
SDATableName=DocumentStatus, ViewerClass=User.HS.MRCNursingNotesStatus
VIEWERLIB: User.HS.MRNursingNotes(NOTStatusDR)
Property methods: StatusGet(), StatusGetObject(), StatusGetObjectId(), StatusGetSwizzled(), StatusIsEmpty(), StatusIsValid(), StatusNewObject(), StatusSet(), StatusSetObject(), StatusSetObjectId(), StatusUnSwizzle()
property Stream as %GlobalBinaryStream;
This property is used when the Note is binary data, e.g DOC, PDF, JPG

Length subject to the total streamlet size limit - 3,000,000

Note that because of the type of this property (%GlobalBinaryStream),
character data written to it must be single-width, ie, no double-wide
Unicode characters. On export, the content will be Base64 encoded, and on
import, Base64 decoded.

HL7ToSDA3:
See class annotation.

Streamlet cache:
In the OnValidate method of the Streamlet class, if the Document does not
have a DocumentURL, NoteText, or Stream and FileType, then an error will be
logged and the Streamlet will not be saved.

Viewer cache:
The list of FileTypes that the Clinical Viewer supports for Documents is
contained in the ValidTypes parameter of the websys.Document class.
Note that the DataId property of websys.Document is not a designative
reference (so the COS syntax document.DataId.docData will not work) but
rather a string field containing the ID of the linked websys.Documentxxx
(where "xxx" is the FileType).
If the value of the Configuration Registry key
"\Viewer\SDA3DocumentStreamEncoded" is "1", then the content of Stream will
be converted from UTF-8 output format (ie, $ZCVT(,"I","UTF8")) before being
inserted into the Viewer Cache. This is useful in cases where the original
document data contained double-wide Unicode characters that had to be
converted to UTF-8 output format before being written to the stream, since
it cannot contain double-wide characters.

HL7: OBX-5.5 : ObservationValue.EDData
HL7: NTE-3 : Comments
VIEWERLIB: User.HS.MRNursingNotes(NOTDocumentDR)->websys.Document(DataId)->websys.Documentxxx(docData)
Property methods: StreamDelete(), StreamGet(), StreamGetObject(), StreamGetObjectId(), StreamGetSwizzled(), StreamIsValid(), StreamNewObject(), StreamOid(), StreamOpen(), StreamSet(), StreamSetObject(), StreamSetObjectId(), StreamUnSwizzle()
property TranscriptionTime as HS.SDA3.TimeStamp;
The time that the document was transcribed

HL7: TXA-7.1 : TranscriptionDateTime.Time
VIEWERLIB: User.HS.MRNursingNotes(NOTCreateDate) + User.HS.MRNursingNotes(NOTCreateTime)
Property methods: TranscriptionTimeDisplayToLogical(), TranscriptionTimeGet(), TranscriptionTimeIsValid(), TranscriptionTimeLogicalToDisplay(), TranscriptionTimeLogicalToTimeStamp(), TranscriptionTimeLogicalToXSD(), TranscriptionTimeNormalize(), TranscriptionTimeOdbcToLogical(), TranscriptionTimeSet(), TranscriptionTimeXSDToLogical()

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab