Skip to main content

HS.SDA3.SupportContact

serial class HS.SDA3.SupportContact extends HS.SDA3.SuperClass

SupportContact appears in the SDA as a list property (SupportContacts) of
HS.SDA3.Patient.

HL7ToSDA3:
In the HL7ToSDA3 transform, it is possible for one NK1 segment to be parsed
as two SupportContacts. One (referred to in these annotations as the
"Inidividual Contact") is parsed from fields 2 through 9 (though nothing
will be parsed, not even an empty SupportContact, if these are all null).
The second ("Organization Contact") is parsed from fields 13, 30, 31, and
32, and only if field 13 is not null.

Streamlet cache:
Note that SupportContacts are not their own type of Streamlets, but are a
serial property of HS.SDA3.Patient. In both the Streamlet Cache (Edge
Gateway) and the Aggregation Cache (Access Gateway), updates to a Patient's
list of SupportContacts are compared to existing SupportContacts. Matches
will update existing SupportContacts, while non-matches are simply added to
the existing list. Matching is done on:
-Name.FamilyName
-Name.GivenName
-Name.MiddleName
-Address.Street
-Address.City.Code+Description
-Address.State.Code+Description
-Address.Zip.Code+Description
-Address.Country.Code+Description
All properties are ALPHAUP collated before matching. All properties are
inbound and existing optional (a null value will not cause the comparison
to be a non-match). For the purposes of matching, both inbound and existing
Descriptions, if null, will be defaulted to Code.
When a match is made and an inbound SupportContact is to be merged into an
existing one, the update logic for most properties is: set the existing
property to the value of the inbound only if the existing is null.
Exceptions to this will be noted below.

Viewer cache:
In the Viewer Cache, no attempt is made to match inbound SupportContacts to
existing PANoks. Every time the PAPerson is updated in the Viewer Cache, if
the SDA Patient has any SupportContacts, any existing PANoks are deleted,
and the entire list of SupportContacts is inserted.

Property Inventory

Properties

property ActionCode as %String;
Supported values:
D = Delete
Any other value = Add or Update
HL7ToSDA3:
Two double quotes ("") in the Set ID field (NK1-1) will be parsed
as ActionCode="D"
HL7: NK1-1 : SetIDNK1
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 Address as HS.SDA3.Address;
Address of the support contact

HL7ToSDA3:
NK1-4 is parsed to the Individual Contact, and NK1-32 to the Organization
Contact. Though both NK1-4 and -32 are repeating fields, HL7ToSDA3 will
only use the first instance of each.

Streamlet cache:
When a match is found between an inbound SupportContact and an existing
one, each property of Address is updated individually, rather than the
update of Address being "all or nothing".

HL7: NK1-4 : Address
HL7: NK1-32 : ContactPersonsAddress

.Street
HL7ToSDA3:
For both fields 4 and 32; subfield 2, if present, is concatenated to
subfield 1.1 as "[1.1]; [2]".
HL7: NK1-4.1.1 : Address.StreetAddressStreetorMailingAddress
HL7: NK1-4.2 : Address.OtherDesignation
HL7: NK1-32.1.1 : ContactPersonsAddress.StreetAddressStreetorMailingAddress
HL7: NK1-32.2 : ContactPersonsAddress.OtherDesignation
VIEWERLIB: User.HS.PANok(NOKAddress2)
.City
HL7ToSDA3:
For both fields 4 and 32, subfield 3 is parsed as City.Code. HL7ToSDA3 does
not set the Description.
HL7: NK1-4.3 : Address.City
HL7: NK1-32.3 : ContactPersonsAddress.City
VIEWERLIB: User.HS.PANok(NOKCityCodeDR)
.State
HL7ToSDA3:
For both fields 4 and 32, subfield 4 is parsed as State.Code. HL7ToSDA3
does not set the Description.
HL7: NK1-4.4 : Address.StateorProvince
HL7: NK1-32.4 : ContactPersonsAddress.StateorProvince
VIEWERLIB: User.HS.PANok(NOKProvinceDR)
.Zip
HL7ToSDA3:
For both fields 4 and 32, subfield 5 is parsed as Zip.Code. HL7ToSDA3 does
not set the Description.
HL7: NK1-4.5 : Address.ZiporPostalCode
HL7: NK1-32.5 : ContactPersonsAddress.ZiporPostalCode
VIEWERLIB: User.HS.PANok(NOKZipDR)
.Country
HL7ToSDA3:
For both fields 4 and 32, subfield 6 is parsed as Country.Code. HL7ToSDA3
does not set the Description.
HL7: NK1-4.6 : Address.Country
HL7: NK1-32.6 : ContactPersonsAddress.Country
VIEWERLIB: User.HS.PANok(NOKCountryDR)
.County
HL7ToSDA3:
For both fields 4 and 32, subfield 9 is parsed as County.Code. HL7ToSDA3
does not set the Description.
HL7: NK1-4.9 : Address.CountyParishCode
HL7: NK1-32.9 : Address.CountyParishCode
VIEWERLIB: Not stored
.FromTime
Viewer cache:
Only the date part of FromTime is stored in the viewer cache. (NOKAddrStartDate is date-only.)
HL7: NK1-4.13.1 : Address.EffectiveDateTime
HL7: NK1-32.13.1 : ContactPersonsAddress.EffectiveDateTime
VIEWERLIB: User.HS.PANok(NOKAddrStartDate)
.ToTime
Viewer cache:
Only the date part of ToTime is stored in the viewer cache. (NOKAddrEndDate
is date-only.)
HL7: NK1-4.14.1 : Address.ExpirationDateTime
HL7: NK1-32.14.1 : ContactPersonsAddress.ExpirationDateTime
VIEWERLIB: User.HS.PANok(NOKAddrEndDate)
Property methods: AddressGet(), AddressGetObject(), AddressGetObjectId(), AddressGetSwizzled(), AddressIsEmpty(), AddressIsValid(), AddressNewObject(), AddressSet(), AddressSetObject(), AddressSetObjectId(), AddressUnSwizzle()
property BirthTime as HS.SDA3.TimeStamp;
The date of birth of this contact

VIEWERLIB: Not stored
Property methods: BirthTimeDisplayToLogical(), BirthTimeGet(), BirthTimeIsValid(), BirthTimeLogicalToDisplay(), BirthTimeLogicalToTimeStamp(), BirthTimeLogicalToXSD(), BirthTimeNormalize(), BirthTimeOdbcToLogical(), BirthTimeSet(), BirthTimeXSDToLogical()
property ContactInfo as HS.SDA3.ContactInfo;
Contact information for the SupportContact

HL7ToSDA3:
NK1-5 and -6 are parsed to the Individual Contact, while NK1-31 is parsed
to the Organization Contact. For each instance of each field, the algorithm
to parse a phone number out of that field 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 continue to the next instance of this field.

-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"

Streamlet cache:
When a match is found between an inbound SupportContact and an existing
one, each property of ContactInfo is updated individually, rather than the update
of ContactInfo being "all or nothing".

HL7: NK1-5 : PhoneNumber
HL7: NK1-6 : BusinessPhoneNumber
HL7: NK1-31 : ContactPersonsTelephoneNumber

.HomePhoneNumber
HL7ToSDA3:
From NK1-5, HomePhoneNumber is parsed from the first instance of the field
with subfield 2 (Use) in ["",PRN,ORN,VHN,ASN,EMR], and subfield 3 in
["",PH], and from which a number can be parsed using the above algorithm.
HL7: NK1-5 : PhoneNumber
VIEWERLIB: User.HS.PANok(NOKTelH)
.WorkPhoneNumber
HL7ToSDA3:
NK1-6 is parsed to the Individual Contact, and NK1-31 is parsed to the
Organization Contact. For both fields, WorkPhoneNumber is parsed from the
first instance of the field with subfield 2 in ["",WPN,ASN,EMR], and
subfield 3 in ["",PH], and from which a number can be parsed using the
above algorithm.
HL7: NK1-6 : BusinessPhoneNumber
HL7: NK1-31 : ContactPersonsTelephoneNumber
VIEWERLIB: User.HS.PANok(NOKTelO)
.MobilePhoneNumber
HL7ToSDA3:
For the Individual Contact, first NK1-5 is parsed for MobilePhoneNumber,
then if none is found there, NK1-6 is parsed. For the Organization Contact,
MobilePhoneNumber is parsed from NK1-31. In both cases, MobilePhoneNumber
is parsed from the first instance with subfield 2 = "BPN" or subfield 3 in
[CP,BP], and from which a number can be parsed using the above algorithm.
HL7: NK1-5 : PhoneNumber
HL7: NK1-6 : BusinessPhoneNumber
HL7: NK1-31 : ContactPersonsTelephoneNumber
VIEWERLIB: User.HS.PANok(NOKMobPhone)
.EmailAddress
HL7ToSDA3:
For the Individual Contact, EmailAddress is parsed from the first non-null
instance of subfield 4 in NK1-5 and -6. For the Organization Contact,
EmailAddress is parsed from the first non-null instance of subfield 4 in
NK1-31.
HL7: NK1-5.4 : PhoneNumber.EmailAddress
HL7: NK1-6.4 : BusinessPhoneNumber.EmailAddress
HL7: NK1-31.4 : ContactPersonsTelephoneNumber.EmailAddress
VIEWERLIB: User.HS.PANok(NOKEmail)
Property methods: ContactInfoGet(), ContactInfoGetObject(), ContactInfoGetObjectId(), ContactInfoGetSwizzled(), ContactInfoIsEmpty(), ContactInfoIsValid(), ContactInfoNewObject(), ContactInfoSet(), ContactInfoSetObject(), ContactInfoSetObjectId(), ContactInfoUnSwizzle()
property ContactType as HS.SDA3.CodeTableDetail.ContactType;
specific relationship role (e.g. employer, emergency contact)

HL7ToSDA3:
NK1-7 is only parsed if subfield 1 or 2 is not null.

HL7: NK1-7 : ContactRole
SDATableName=ContactType, ViewerClass=User.HS.PACContactType
VIEWERLIB: User.HS.PANok(NOKContactTypeDR)

.Code
HL7: NK1-7.1 : ContactRole.Identifier
VIEWERLIB: User.HS.PACContactType(CONTTPCode)
.Description
HL7: NK1-7.2 : ContactRole.Text
VIEWERLIB: User.HS.PACContactType(CONTTPCode)
VIEWERLIB: User.HS.PACContactType(CONTTPPriority)
.SDACodingStandard
HL7: NK1-7.3 : ContactRole.NameofCodingSystem
VIEWERLIB: Not stored
Property methods: ContactTypeGet(), ContactTypeGetObject(), ContactTypeGetObjectId(), ContactTypeGetSwizzled(), ContactTypeIsEmpty(), ContactTypeIsValid(), ContactTypeNewObject(), ContactTypeSet(), ContactTypeSetObject(), ContactTypeSetObjectId(), ContactTypeUnSwizzle()
property CustomPairs as list of HS.SDA3.NVPair;
Streamlet cache:
Once a match has been identified between an inbound and existing
SupportContact, the CustomPairs of each are compared for possible matches,
matching on Name and Value. Matching on each property is exact. If no match
is found, the inbound NVPair is inserted into the existing CustomPairs
list.

Viewer Cache: Even though SupportContact is not a streamlet type,
CustomPairs are still supported, and stored with info type "NOK".

.Name
VIEWERLIB: web.SDA3.NVPair(Name)
.Value
VIEWERLIB: web.SDA3.NVPair(Value)

Property methods: CustomPairsBuildValueArray(), CustomPairsCollectionToDisplay(), CustomPairsCollectionToOdbc(), CustomPairsDisplayToCollection(), CustomPairsGet(), CustomPairsGetObject(), CustomPairsGetObjectId(), CustomPairsGetSwizzled(), CustomPairsIsValid(), CustomPairsOdbcToCollection(), CustomPairsSet(), CustomPairsSetObject(), CustomPairsSetObjectId()
property EncounterNumber as %String (MAXLEN = 220);
Not used.
Property methods: EncounterNumberDisplayToLogical(), EncounterNumberGet(), EncounterNumberIsValid(), EncounterNumberLogicalToDisplay(), EncounterNumberLogicalToOdbc(), EncounterNumberNormalize(), EncounterNumberSet()
property EnteredAt as HS.SDA3.CodeTableDetail.Organization;
HL7ToSDA3:
The Organization Contact will only be parsed from an NK1 segment if NK1-13
is not null. Though NK1-13 is a repeating field, HL7ToSDA3 only uses the
first instance.

HL7: NK1-13 : OrganizationNameNK1
SDATableName=Organization, ViewerClass=User.HS.CTHospital
VIEWERLIB: User.HS.PANok(NOKUpdateHospitalDR)

.Code
HL7ToSDA3:
If subfield 10 is not null, it will be parsed to Code. Else subfield 3 will
be parsed to Code.
HL7: NK1-13.10 : OrganizationNameNK1.OrganizationIdentifier
HL7: NK1-13.3 : OrganizationNameNK1.IDNumber
VIEWERLIB: User.HS.CTHospital(HOSPCode)
.Description
HL7: NK1-13.1 : OrganizationNameNK1.OrganizationName
VIEWERLIB: User.HS.CTHospital(HOSPDesc)
.SDACodingStandard
HL7: NK1-13.6 : OrganizationNameNK1.AssigningAuthority
VIEWERLIB: Not stored
Property methods: EnteredAtGet(), EnteredAtGetObject(), EnteredAtGetObjectId(), EnteredAtGetSwizzled(), EnteredAtIsEmpty(), EnteredAtIsValid(), EnteredAtNewObject(), EnteredAtSet(), EnteredAtSetObject(), EnteredAtSetObjectId(), EnteredAtUnSwizzle()
property EnteredBy as HS.SDA3.CodeTableDetail.User;
SDATableName=User, ViewerClass=User.HS.SSUser
VIEWERLIB: User.HS.PANok(NOKUpdateUserDR)
Property methods: EnteredByGet(), EnteredByGetObject(), EnteredByGetObjectId(), EnteredByGetSwizzled(), EnteredByIsEmpty(), EnteredByIsValid(), EnteredByNewObject(), EnteredBySet(), EnteredBySetObject(), EnteredBySetObjectId(), EnteredByUnSwizzle()
property EnteredOn as HS.SDA3.TimeStamp;
Viewer cache:
NOKUpdateDate is set to the date part of EnteredOn, and NOKUpdateTime is
set to the time part. Additionally, NOKIDDate is set to the date part.

VIEWERLIB: User.HS.PANok(NOKUpdateDate) + User.HS.PANok(NOKUpdateTime)
VIEWERLIB: User.HS.PANok(NOKIDDate)
Property methods: EnteredOnDisplayToLogical(), EnteredOnGet(), EnteredOnIsValid(), EnteredOnLogicalToDisplay(), EnteredOnLogicalToTimeStamp(), EnteredOnLogicalToXSD(), EnteredOnNormalize(), EnteredOnOdbcToLogical(), EnteredOnSet(), EnteredOnXSDToLogical()
property Extension as HS.Local.SDA3.SupportContactExtension;
Property methods: ExtensionGet(), ExtensionGetObject(), ExtensionGetObjectId(), ExtensionGetSwizzled(), ExtensionIsEmpty(), ExtensionIsValid(), ExtensionNewObject(), ExtensionSet(), ExtensionSetObject(), ExtensionSetObjectId(), ExtensionUnSwizzle()
property ExternalId as %String (MAXLEN = 220);
Not used.
Property methods: ExternalIdDisplayToLogical(), ExternalIdGet(), ExternalIdIsValid(), ExternalIdLogicalToDisplay(), ExternalIdLogicalToOdbc(), ExternalIdNormalize(), ExternalIdSet()
property FromTime as HS.SDA3.TimeStamp;
Viewer cache:
Only the date part of FromTime is stored in the Viewer Cache. (NOKDateFrom
is date-only.)

HL7: NK1-8 : StartDate
VIEWERLIB: User.HS.PANok(NOKDateFrom)
Property methods: FromTimeDisplayToLogical(), FromTimeGet(), FromTimeIsValid(), FromTimeLogicalToDisplay(), FromTimeLogicalToTimeStamp(), FromTimeLogicalToXSD(), FromTimeNormalize(), FromTimeOdbcToLogical(), FromTimeSet(), FromTimeXSDToLogical()
property Gender as HS.SDA3.CodeTableDetail.Gender;
The gender of this contact

VIEWERLIB: Not stored
Property methods: GenderGet(), GenderGetObject(), GenderGetObjectId(), GenderGetSwizzled(), GenderIsEmpty(), GenderIsValid(), GenderNewObject(), GenderSet(), GenderSetObject(), GenderSetObjectId(), GenderUnSwizzle()
property Identifiers as list of HS.SDA3.PatientNumber;
A list of identifying numbers for this contact, such as insurance card
number, various government-assigned numbers, etc.

Streamlet cache:
Once a match has been identified between an inbound and existing
SupportContact, the Identifiers of each are compared for possible matches,
matching on Number, NumberType, and Organization.Code. Matching on each
property is exact. If no match is found, the inbound PatientNumber is
inserted into the existing Identifiers list.

VIEWERLIB: Not stored
Property methods: IdentifiersBuildValueArray(), IdentifiersCollectionToDisplay(), IdentifiersCollectionToOdbc(), IdentifiersDisplayToCollection(), IdentifiersGet(), IdentifiersGetObject(), IdentifiersGetObjectId(), IdentifiersGetSwizzled(), IdentifiersIsValid(), IdentifiersOdbcToCollection(), IdentifiersSet(), IdentifiersSetObject(), IdentifiersSetObjectId()
property Name as HS.SDA3.Name;
Primary name for this person (e.g. legal name)

HL7ToSDA3:
NK1-2 is parsed to the Individual Contact, and NK1-30 to the Organization
Contact. Though both NK1-2 and -30 are repeating fields, HL7ToSDA3 will
only use the first instance of each.

Streamlet cache:
When a match is found between an inbound SupportContact and an existing
one, each property of Name is updated individually, rather than the update
of Name being "all or nothing".

HL7: NK1-2 : Name
HL7: NK1-30 : ContactPersonsName

.FamilyName
HL7: NK1-2.1.1 : Name.FamilyName.Surname
HL7: NK1-30.1.1 : ContactPersonsName.FamilyName.Surname
VIEWERLIB: User.HS.PANok(NOKName)
.FamilyNamePrefix
HL7: NK1-2.1.2 : Name.FamilyName.OwnSurnamePrefix
HL7: NK1-30.1.2 : ContactPersonsName.FamilyName.OwnSurnamePrefix
VIEWERLIB: User.HS.PANok(NOKFamilyNamePrefix)
.GivenName
HL7: NK1-2.2 : Name.GivenName
HL7: NK1-30.2 : ContactPersonsName.GivenName
VIEWERLIB: User.HS.PANok(NOKName2)
.MiddleName
HL7: NK1-2.3 : Name.SecondandFurtherGivenNames
HL7: NK1-30.3 : ContactPersonsName.SecondandFurtherGivenNames
VIEWERLIB: User.HS.PANok(NOKName3)
.NameSuffix
HL7: NK1-2.4 : Name.Suffix
HL7: NK1-30.4 : ContactPersonsName.Suffix
VIEWERLIB: User.HS.PANok(NOKNameSuffix)
.NamePrefix
HL7: NK1-2.5 : Name.Prefix
HL7: NK1-30.5 : ContactPersonsName.Prefix
VIEWERLIB: User.HS.PANok(NOKNamePrefix)
.ProfessionalSuffix
HL7: NK1-2.14 : Name.ProfessionalSuffix
HL7: NK1-30.14 : ContactPersonsName.ProfessionalSuffix
VIEWERLIB: User.HS.PANok(NOKProfessionalSuffix)
Property methods: NameGet(), NameGetObject(), NameGetObjectId(), NameGetSwizzled(), NameIsEmpty(), NameIsValid(), NameNewObject(), NameSet(), NameSetObject(), NameSetObjectId(), NameUnSwizzle()
property PrimaryContact as HS.SDA3.Boolean;
A boolean property indicating whether this contact is the patient's primary
contact.

VIEWERLIB: Not stored
Property methods: PrimaryContactDisplayToLogical(), PrimaryContactGet(), PrimaryContactIsValid(), PrimaryContactIsValidDT(), PrimaryContactLogicalToDisplay(), PrimaryContactLogicalToXSD(), PrimaryContactNormalize(), PrimaryContactSet(), PrimaryContactXSDToLogical()
property PrimaryLanguage as HS.SDA3.CodeTableDetail.Language;
This contact's primary spoken language

VIEWERLIB: Not stored
Property methods: PrimaryLanguageGet(), PrimaryLanguageGetObject(), PrimaryLanguageGetObjectId(), PrimaryLanguageGetSwizzled(), PrimaryLanguageIsEmpty(), PrimaryLanguageIsValid(), PrimaryLanguageNewObject(), PrimaryLanguageSet(), PrimaryLanguageSetObject(), PrimaryLanguageSetObjectId(), PrimaryLanguageUnSwizzle()
property Relationship as HS.SDA3.CodeTableDetail.Relationship;
Personal relationship of support contact to patient (e.g. brother, daughter)

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

HL7: NK1-3 : Relationship
SDATableName=Relationship, ViewerClass=User.HS.CTRelation
VIEWERLIB: User.HS.PANok(NOKRelationDR)

.Code
HL7: NK1-3.1 : Relationship.Identifier
VIEWERLIB: User.HS.CTRelation(CTRLTCode)
.Description
HL7: NK1-3.2 : Relationship.Text
VIEWERLIB: User.HS.CTRelation(CTRLTDesc)
.SDACodingStandard
HL7: NK1-3.3 : Relationship.NameofCodingSystem
VIEWERLIB: Not stored
.CodeSystemVersionId
HL7: NK1-3.7 : Relationship.CodingSystemVersionID
VIEWERLIB: Not stored
.PriorCodes
HL7ToSDA3:
If subfield 4 or 5 is not null, then subfields 4, 5, 6, and 8 are parsed
into the Code, Description, CodeSystem, and CodeSystemVersionId,
respectively, of a PriorCode in the list of PriorCodes. The Type will be
parsed as "A" for "Alternate".
HL7: NK1-3.4 : Relationship.AlternateIdentifier
HL7: NK1-3.5 : Relationship.AlternateText
HL7: NK1-3.6 : Relationship.NameofAlternateCodingSystem
HL7: NK1-3.8 : Relationship.AlternateCodingSystemVersionID
VIEWERLIB: Not stored
Property methods: RelationshipGet(), RelationshipGetObject(), RelationshipGetObjectId(), RelationshipGetSwizzled(), RelationshipIsEmpty(), RelationshipIsValid(), RelationshipNewObject(), RelationshipSet(), RelationshipSetObject(), RelationshipSetObjectId(), RelationshipUnSwizzle()
property ToTime as HS.SDA3.TimeStamp;
Viewer cache:
Only the date part of ToTime is stored in the Viewer Cache. (NOKDateTo
is date-only.)

HL7: NK1-9 : EndDate
VIEWERLIB: User.HS.PANok(NOKDateTo)
Property methods: ToTimeDisplayToLogical(), ToTimeGet(), ToTimeIsValid(), ToTimeLogicalToDisplay(), ToTimeLogicalToTimeStamp(), ToTimeLogicalToXSD(), ToTimeNormalize(), ToTimeOdbcToLogical(), ToTimeSet(), ToTimeXSDToLogical()
property UpdatedOn as HS.SDA3.TimeStamp;
Not used.
Property methods: UpdatedOnDisplayToLogical(), UpdatedOnGet(), UpdatedOnIsValid(), UpdatedOnLogicalToDisplay(), UpdatedOnLogicalToTimeStamp(), UpdatedOnLogicalToXSD(), UpdatedOnNormalize(), UpdatedOnOdbcToLogical(), UpdatedOnSet(), UpdatedOnXSDToLogical()

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab