Skip to main content

HS.Registry.Patient

persistent class HS.Registry.Patient extends %Library.Persistent, HS.Util.UpdateFrom, %Library.Populate, %XML.Adaptor

SQL Table Name: HS_Registry.Patient

Property Inventory

Method Inventory

Parameters

parameter DSINTERVAL = 5;
Inherited description: DSINTERVAL is the number of seconds between one DSTIME value and the next. The DSTIME value for DSINTERVAL > 0 is computed from $ZTIMESTAMP and is the number of seconds from day 0, time 0 to the nearest interval, rounded down. Using an interval has the effect of grouping all DSTIME entries for the class in some number of seconds.
parameter DSTIME = AUTO;
Inherited description: If the DSTIME parameter is set to AUTO then the most recent filing operation in the current DSTIME value for each object will be recorded in a global, ^OBJ.DSTIME:
^OBJ.DSTIME(ExtentName,DSTIME,objectID) = filing operation
For DSTIME=AUTO the DSTIME value is recorded in ^OBJ.DSTIME and is set by the consumer of DSTIME data.
Refer to %DeepSee documentation for more information on how DSTIME is used by %DeepSee.
The filing operations are:
CodeOperation
0Update
1Insert
2Delete

If the DSTIME parameter is set to MANUAL then the user is responsible for journaling object filing operations. If DSTIME is set to "CONDITIONAL", the user is expected to define the parameter DSCONDITION setting it to an expression which will determine if the actions performed when DSTIME is set to AUTO will execute or not
parameter XMLIGNOREINVALIDTAG = 1;
Inherited description: The XMLIGNOREINVALIDTAG parameter allows the programmer to control handling of unexpected elements in the XML input. The XMLIGNOREINVALIDTAG parameter will only take affect if XMLSEQUENCE = 0 (the default). By default (XMLIGNOREINVALIDTAG = 0), will treat an unexpected element as an error. If XMLIGNOREINVALIDTAG is set = 1 and XMLSEQUENCE = 0, then unexpected elements will be ignored.
parameter XMLIGNORENULL = inputonly;
Inherited description: XMLIGNORENULL allows the programmer to override the default XML handling of empty strings for properties of type %String. By default (XMLIGNORENULL = 0), empty strings in the XML input are stored as $c(0) and $c(0) is written to XML as an empty tag. A missing tag in the XML input is always stored as "" and "" is always output to XML as no tag.

If XMLIGNORENULL is set = 1, then both missing tags in the XML and empty strings are input as "", and both "" and $c(0) are output as empty tags (i.e. <tag></tag>).

If XMLIGNORENULL is set = "inputonly", then both missing tags in the XML and empty strings are input as "". Output of "" and $c(0) are for XMLIGNORENULL = 0: $c(0) is output as an empty tag (i.e. <tag></tag>) and "" is output as no tag.

If XMLIGNORENULL = "runtime" (runtime is not case sensitive), then the behavior of XMLIGNORENULL is determined by the format parameter of XMLExport, XMLImport and %XML.Reader.OpenFile. The default behavior for XMLIGNORENULL="runtime is the same as XMLIGNORENULL=0. Adding "ignorenull" to the format argument changes the behavior to that of XMLIGNORENULL=1. "ignorenull" shoud be separated by a comma from literal/encoded part of the format. Example values for format are "", ",ignorenull", "literal,ignorenull" and "encoded,ignorenull". Note that "inputonly" is equivalent to using ,ignorenull for XMLExport and not for %XML.Reader.

Properties

property AdditionalInfo as array of HS.Types.AdditionalInfoItem;
Property methods: AdditionalInfoBuildValueArray(), AdditionalInfoCollectionToDisplay(), AdditionalInfoCollectionToOdbc(), AdditionalInfoDisplayToCollection(), AdditionalInfoDisplayToLogical(), AdditionalInfoGet(), AdditionalInfoGetObject(), AdditionalInfoGetObjectId(), AdditionalInfoGetStored(), AdditionalInfoGetSwizzled(), AdditionalInfoIsValid(), AdditionalInfoLogicalToDisplay(), AdditionalInfoLogicalToOdbc(), AdditionalInfoNormalize(), AdditionalInfoOdbcToCollection(), AdditionalInfoSet(), AdditionalInfoSetObject(), AdditionalInfoSetObjectId()
relationship Addresses as array of HS.Registry.Patient.Address [ InitialExpression = $listbuild("HS.Registry.Patient.Address","Patient",+$this,"children",1,1) , Transient , Inverse = Patient , Cardinality = children ];
Property methods: AddressesGet(), AddressesGetObject(), AddressesGetObjectId(), AddressesGetSwizzled(), AddressesIsEmpty(), AddressesIsValid(), AddressesNewObject(), AddressesRClose(), AddressesRExec(), AddressesRFetch(), AddressesRelate(), AddressesSQLCompute(), AddressesSet(), AddressesUnRelate()
property AssigningAuthority as HS.HC.DataType.AssignAuthName;
Assigning Authority for the MRN
Property methods: AssigningAuthorityDisplayToLogical(), AssigningAuthorityGet(), AssigningAuthorityGetStored(), AssigningAuthorityIsValid(), AssigningAuthorityLogicalToDisplay(), AssigningAuthorityLogicalToOdbc(), AssigningAuthorityNormalize(), AssigningAuthoritySet()
property BirthDateTime as %TimeStamp (SELECTIVITY = ".05%");
Property methods: BirthDateTimeDisplayToLogical(), BirthDateTimeGet(), BirthDateTimeGetStored(), BirthDateTimeIsValid(), BirthDateTimeLogicalToDisplay(), BirthDateTimeLogicalToXSD(), BirthDateTimeNormalize(), BirthDateTimeOdbcToLogical(), BirthDateTimeSet(), BirthDateTimeXSDToLogical()
property BirthMonth as %Integer [ Transient ];
Property methods: BirthMonthCompute(), BirthMonthDisplayToLogical(), BirthMonthGet(), BirthMonthIsValid(), BirthMonthLogicalToDisplay(), BirthMonthNormalize(), BirthMonthSQLCompute(), BirthMonthSet(), BirthMonthSetT(), BirthMonthXSDToLogical()
property BirthOrder as %Integer;
Property methods: BirthOrderDisplayToLogical(), BirthOrderGet(), BirthOrderGetStored(), BirthOrderIsValid(), BirthOrderLogicalToDisplay(), BirthOrderNormalize(), BirthOrderSet(), BirthOrderXSDToLogical()
property BirthPlace as HS.Types.Address;
Property methods: BirthPlaceGet(), BirthPlaceGetObject(), BirthPlaceGetObjectId(), BirthPlaceGetStored(), BirthPlaceGetSwizzled(), BirthPlaceIsEmpty(), BirthPlaceIsValid(), BirthPlaceNewObject(), BirthPlaceSet(), BirthPlaceSetObject(), BirthPlaceSetObjectId(), BirthPlaceUnSwizzle()
property BirthYear as %Integer [ Transient ];
Property methods: BirthYearCompute(), BirthYearDisplayToLogical(), BirthYearGet(), BirthYearIsValid(), BirthYearLogicalToDisplay(), BirthYearNormalize(), BirthYearSQLCompute(), BirthYearSet(), BirthYearSetT(), BirthYearXSDToLogical()
property CommunicationPreference as %String (DISPLAYLIST = ","""",Email,Phone,Mail", VALUELIST = ","""",Email,Phone,Mail");
For MU2
Property methods: CommunicationPreferenceDisplayToLogical(), CommunicationPreferenceGet(), CommunicationPreferenceGetStored(), CommunicationPreferenceIsValid(), CommunicationPreferenceLogicalToDisplay(), CommunicationPreferenceLogicalToOdbc(), CommunicationPreferenceNormalize(), CommunicationPreferenceSet()
property CreatedBy as %String (MAXLEN = 200);
Property methods: CreatedByDisplayToLogical(), CreatedByGet(), CreatedByGetStored(), CreatedByIsValid(), CreatedByLogicalToDisplay(), CreatedByLogicalToOdbc(), CreatedByNormalize(), CreatedBySet()
property CreatedOn as %TimeStamp;
This is based on external input, coming from the patient's SDA CreatedOn
Property methods: CreatedOnDisplayToLogical(), CreatedOnGet(), CreatedOnGetStored(), CreatedOnIsValid(), CreatedOnLogicalToDisplay(), CreatedOnLogicalToXSD(), CreatedOnNormalize(), CreatedOnOdbcToLogical(), CreatedOnSet(), CreatedOnXSDToLogical()
property CustomClassName as %String (MAXLEN = 64);
To allow arbitrary custom data to be added - this specifies a classname, whose object contents will be serialed into CustomXMLString
Property methods: CustomClassNameDisplayToLogical(), CustomClassNameGet(), CustomClassNameGetStored(), CustomClassNameIsValid(), CustomClassNameLogicalToDisplay(), CustomClassNameLogicalToOdbc(), CustomClassNameNormalize(), CustomClassNameSet()
property CustomXMLString as %String);
If a CustomClassName is used, this should represent the XML export of an object of that class. The top tag should be "CustomXML"
Property methods: CustomXMLStringDisplayToLogical(), CustomXMLStringGet(), CustomXMLStringGetStored(), CustomXMLStringIsValid(), CustomXMLStringLogicalToDisplay(), CustomXMLStringLogicalToOdbc(), CustomXMLStringNormalize(), CustomXMLStringSet()
property DeathStatus as %Boolean;
Property methods: DeathStatusDisplayToLogical(), DeathStatusGet(), DeathStatusGetStored(), DeathStatusIsValid(), DeathStatusLogicalToDisplay(), DeathStatusLogicalToXSD(), DeathStatusNormalize(), DeathStatusSet(), DeathStatusXSDToLogical()
property DeathTime as %TimeStamp;
Property methods: DeathTimeDisplayToLogical(), DeathTimeGet(), DeathTimeGetStored(), DeathTimeIsValid(), DeathTimeLogicalToDisplay(), DeathTimeLogicalToXSD(), DeathTimeNormalize(), DeathTimeOdbcToLogical(), DeathTimeSet(), DeathTimeXSDToLogical()
property EthnicGroup as %String;
Property methods: EthnicGroupDisplayToLogical(), EthnicGroupGet(), EthnicGroupGetStored(), EthnicGroupIsValid(), EthnicGroupLogicalToDisplay(), EthnicGroupLogicalToOdbc(), EthnicGroupNormalize(), EthnicGroupSet()
property Extension as HS.Local.SDA3.PatientExtension;
Extension class for custom properties
Property methods: ExtensionGet(), ExtensionGetObject(), ExtensionGetObjectId(), ExtensionGetStored(), ExtensionGetSwizzled(), ExtensionIsEmpty(), ExtensionIsValid(), ExtensionNewObject(), ExtensionSet(), ExtensionSetObject(), ExtensionSetObjectId(), ExtensionUnSwizzle()
property Facility as HS.Facility.Config (SELECTIVITY = "5%");
Facility for this patient
Property methods: FacilityGet(), FacilityGetObject(), FacilityGetObjectId(), FacilityGetStored(), FacilityGetSwizzled(), FacilityIsValid(), FacilityNewObject(), FacilitySet(), FacilitySetObject(), FacilitySetObjectId(), FacilityUnSwizzle()
property FathersName as HS.Types.PersonName;
Property methods: FathersNameGet(), FathersNameGetObject(), FathersNameGetObjectId(), FathersNameGetStored(), FathersNameGetSwizzled(), FathersNameIsEmpty(), FathersNameIsValid(), FathersNameNewObject(), FathersNameSet(), FathersNameSetObject(), FathersNameSetObjectId(), FathersNameUnSwizzle()
property FullName as %String) [ Transient ];
Property methods: FullNameCompute(), FullNameDisplayToLogical(), FullNameGet(), FullNameIsValid(), FullNameLogicalToDisplay(), FullNameLogicalToOdbc(), FullNameNormalize(), FullNameSQLCompute(), FullNameSet(), FullNameSetT()
property Gender as %String (SELECTIVITY = "50%");
Property methods: GenderDisplayToLogical(), GenderGet(), GenderGetStored(), GenderIsValid(), GenderLogicalToDisplay(), GenderLogicalToOdbc(), GenderNormalize(), GenderSet()
property GenderDescription as %String);
Property methods: GenderDescriptionDisplayToLogical(), GenderDescriptionGet(), GenderDescriptionGetStored(), GenderDescriptionIsValid(), GenderDescriptionLogicalToDisplay(), GenderDescriptionLogicalToOdbc(), GenderDescriptionNormalize(), GenderDescriptionSet()
relationship Identifiers as array of HS.Registry.Patient.Identifier [ InitialExpression = $listbuild("HS.Registry.Patient.Identifier","Patient",+$this,"children",1,1) , Transient , Inverse = Patient , Cardinality = children ];
Property methods: IdentifiersGet(), IdentifiersGetObject(), IdentifiersGetObjectId(), IdentifiersGetSwizzled(), IdentifiersIsEmpty(), IdentifiersIsValid(), IdentifiersNewObject(), IdentifiersRClose(), IdentifiersRExec(), IdentifiersRFetch(), IdentifiersRelate(), IdentifiersSQLCompute(), IdentifiersSet(), IdentifiersUnRelate()
property Language as %String;
Property methods: LanguageDisplayToLogical(), LanguageGet(), LanguageGetStored(), LanguageIsValid(), LanguageLogicalToDisplay(), LanguageLogicalToOdbc(), LanguageNormalize(), LanguageSet()
property LastEnteredBy as %String (MAXLEN = 200);
Property methods: LastEnteredByDisplayToLogical(), LastEnteredByGet(), LastEnteredByGetStored(), LastEnteredByIsValid(), LastEnteredByLogicalToDisplay(), LastEnteredByLogicalToOdbc(), LastEnteredByNormalize(), LastEnteredBySet()
property LastEnteredOn as %TimeStamp;
This is based on external input, coming from the patient's SDA EnteredOn
Property methods: LastEnteredOnDisplayToLogical(), LastEnteredOnGet(), LastEnteredOnGetStored(), LastEnteredOnIsValid(), LastEnteredOnLogicalToDisplay(), LastEnteredOnLogicalToXSD(), LastEnteredOnNormalize(), LastEnteredOnOdbcToLogical(), LastEnteredOnSet(), LastEnteredOnXSDToLogical()
property LastEnteredOnC as %TimeStamp [ Transient ];
Property methods: LastEnteredOnCCompute(), LastEnteredOnCDisplayToLogical(), LastEnteredOnCGet(), LastEnteredOnCIsValid(), LastEnteredOnCLogicalToDisplay(), LastEnteredOnCLogicalToXSD(), LastEnteredOnCNormalize(), LastEnteredOnCOdbcToLogical(), LastEnteredOnCSQLCompute(), LastEnteredOnCSet(), LastEnteredOnCSetT(), LastEnteredOnCXSDToLogical()
property LastUpdated as %Date (XMLPROJECTION = "NONE") [ InitialExpression = $P($H,",") ];
Date most recently inserted or updated - this is not based on external input; just on when the data is stored
Property methods: LastUpdatedDisplayToLogical(), LastUpdatedGet(), LastUpdatedGetStored(), LastUpdatedIsValid(), LastUpdatedLogicalToDisplay(), LastUpdatedLogicalToOdbc(), LastUpdatedLogicalToXSD(), LastUpdatedNormalize(), LastUpdatedOdbcToLogical(), LastUpdatedSet(), LastUpdatedXSDToLogical()
property MPIID as %String (SELECTIVITY = ".001%");
Property methods: MPIIDDisplayToLogical(), MPIIDGet(), MPIIDGetStored(), MPIIDIsValid(), MPIIDLogicalToDisplay(), MPIIDLogicalToOdbc(), MPIIDNormalize(), MPIIDSet()
property MRN as HS.Types.MRN (SELECTIVITY = ".004%");
This patient's MRN (from the above assigning authority)
Property methods: MRNDisplayToLogical(), MRNGet(), MRNGetStored(), MRNIsValid(), MRNLogicalToDisplay(), MRNLogicalToOdbc(), MRNNormalize(), MRNSet()
property MaritalStatus as %String;
Property methods: MaritalStatusDisplayToLogical(), MaritalStatusGet(), MaritalStatusGetStored(), MaritalStatusIsValid(), MaritalStatusLogicalToDisplay(), MaritalStatusLogicalToOdbc(), MaritalStatusNormalize(), MaritalStatusSet()
property MothersMaidenSurname as %String (MAXLEN = 220);
Property methods: MothersMaidenSurnameDisplayToLogical(), MothersMaidenSurnameGet(), MothersMaidenSurnameGetStored(), MothersMaidenSurnameIsValid(), MothersMaidenSurnameLogicalToDisplay(), MothersMaidenSurnameLogicalToOdbc(), MothersMaidenSurnameNormalize(), MothersMaidenSurnameSet()
property MothersName as HS.Types.PersonName;
Property methods: MothersNameGet(), MothersNameGetObject(), MothersNameGetObjectId(), MothersNameGetStored(), MothersNameGetSwizzled(), MothersNameIsEmpty(), MothersNameIsValid(), MothersNameNewObject(), MothersNameSet(), MothersNameSetObject(), MothersNameSetObjectId(), MothersNameUnSwizzle()
property Name as HS.Types.PersonName;
Property methods: NameGet(), NameGetObject(), NameGetObjectId(), NameGetStored(), NameGetSwizzled(), NameIsEmpty(), NameIsValid(), NameNewObject(), NameSet(), NameSetObject(), NameSetObjectId(), NameUnSwizzle()
relationship Names as array of HS.Registry.Patient.Name [ InitialExpression = $listbuild("HS.Registry.Patient.Name","Patient",+$this,"children",1,1) , Transient , Inverse = Patient , Cardinality = children ];
Property methods: NamesGet(), NamesGetObject(), NamesGetObjectId(), NamesGetSwizzled(), NamesIsEmpty(), NamesIsValid(), NamesNewObject(), NamesRClose(), NamesRExec(), NamesRFetch(), NamesRelate(), NamesSQLCompute(), NamesSet(), NamesUnRelate()
property Race as %String;
Property methods: RaceDisplayToLogical(), RaceGet(), RaceGetStored(), RaceIsValid(), RaceLogicalToDisplay(), RaceLogicalToOdbc(), RaceNormalize(), RaceSet()
property ReligiousAffiliation as %String;
Property methods: ReligiousAffiliationDisplayToLogical(), ReligiousAffiliationGet(), ReligiousAffiliationGetStored(), ReligiousAffiliationIsValid(), ReligiousAffiliationLogicalToDisplay(), ReligiousAffiliationLogicalToOdbc(), ReligiousAffiliationNormalize(), ReligiousAffiliationSet()
property SSN as %String (MAXLEN = 220, SELECTIVITY = ".004%");
Person's social security or government id (made long to support hashed SSNs)
Property methods: SSNDisplayToLogical(), SSNGet(), SSNGetStored(), SSNIsValid(), SSNLogicalToDisplay(), SSNLogicalToOdbc(), SSNNormalize(), SSNSet()
property SpousesName as HS.Types.PersonName;
Property methods: SpousesNameGet(), SpousesNameGetObject(), SpousesNameGetObjectId(), SpousesNameGetStored(), SpousesNameGetSwizzled(), SpousesNameIsEmpty(), SpousesNameIsValid(), SpousesNameNewObject(), SpousesNameSet(), SpousesNameSetObject(), SpousesNameSetObjectId(), SpousesNameUnSwizzle()
property StrippedSSN as %String [ Calculated ];
Property methods: StrippedSSNCompute(), StrippedSSNDisplayToLogical(), StrippedSSNGet(), StrippedSSNIsValid(), StrippedSSNLogicalToDisplay(), StrippedSSNLogicalToOdbc(), StrippedSSNNormalize(), StrippedSSNSQLCompute()
relationship Telecoms as array of HS.Registry.Patient.Telecom [ InitialExpression = $listbuild("HS.Registry.Patient.Telecom","Patient",+$this,"children",1,1) , Transient , Inverse = Patient , Cardinality = children ];
Property methods: TelecomsGet(), TelecomsGetObject(), TelecomsGetObjectId(), TelecomsGetSwizzled(), TelecomsIsEmpty(), TelecomsIsValid(), TelecomsNewObject(), TelecomsRClose(), TelecomsRExec(), TelecomsRFetch(), TelecomsRelate(), TelecomsSQLCompute(), TelecomsSet(), TelecomsUnRelate()
property VIP as %Boolean;
Property methods: VIPDisplayToLogical(), VIPGet(), VIPGetStored(), VIPIsValid(), VIPLogicalToDisplay(), VIPLogicalToXSD(), VIPNormalize(), VIPSet(), VIPXSDToLogical()

Methods

classmethod FuzzyDateMatch(pDateh1 As %Date = 0, pDateh2 As %Date = 0) as %Integer [ SQLProc = Patient_FuzzyDateMatch ]
Projected as the stored procedure: Patient_FuzzyDateMatch
classmethod GetBestRecord(pMPIID As %String) as HS.Registry.Patient
Returns the best patient record = last updated at the top-tier facility
classmethod GetHomeRecord(pMPIID As %String) as HS.Registry.Patient
Returns the home patient record
classmethod GetRecordForMRN(pAssigningAuthority As %String, pMRN As %String) as HS.Registry.Patient
Returns the patient record for AA / MRN
classmethod StripPhone(pPhone As %String) as %String [ SQLProc = Patient_StripPhone ]
Projected as the stored procedure: Patient_StripPhone
Strips common punctuation from a telephone number
classmethod StripSSN(pSSN As %String) as %String [ SQLProc = Patient_StripSSN ]
Projected as the stored procedure: Patient_StripSSN
Strips common punctuation from a social security number

Queries

query MRNsForPatient(pMPIID As %String = "")
SQL Query:
SELECT DISTINCT %exact(MRN) AS MRN,%exact(AssigningAuthority) AS AssigningAuthority FROM Patient WHERE MPIID = :pMPIID
Lists the MRNs for an MPIID

Indexes

index ($Patient on ) [Extent, Type = bitmap];
index (DOBIndex on BirthDateTime);
Index methods: DOBIndexExists()
index (FacilityIndex on Facility);
Index methods: FacilityIndexExists()
index (GenderIndex on Gender) [Type = bitmap];
index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (MPIIDIndex on MPIID);
Index methods: MPIIDIndexExists()
index (MRNIndex on MRN,AssigningAuthority,Facility) [Unique];
Index methods: MRNIndexCheck(), MRNIndexCheckUnique(), MRNIndexDelete(), MRNIndexExists(), MRNIndexOpen(), MRNIndexSQLCheckUnique(), MRNIndexSQLExists(), MRNIndexSQLFindPKeyByConstraint(), MRNIndexSQLFindRowIDByConstraint()
index (NameIndex on Name.Family,Name.Given);
Index methods: NameIndexExists()
index (SSNIndex on SSN);
Index methods: SSNIndexExists()
index (StrippedSSNIndex on StrippedSSN);
Index methods: StrippedSSNIndexExists()

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (HS.Registry.Patient)

^HS.Registry.PatientD(ID,"AdditionalInfo",n)
=
AdditionalInfo(n)

Storage Model: Storage (HS.Registry.Patient)

^HS.Registry.PatientD(ID)
=
%%CLASSNAME
Name
BirthDateTime
BirthMonth
BirthYear
BirthPlace
Gender
MaritalStatus
ReligiousAffiliation
Race
EthnicGroup
Language
VIP
MothersMaidenSurname
MPIID
Facility
AssigningAuthority
MRN
SSN
LastUpdated
CustomClassName
CustomXMLString
CommunicationPreference
CreatedBy
CreatedOn
LastEnteredBy
LastEnteredOn
DeathTime
FathersName
MothersName
SpousesName
BirthOrder
DeathStatus
Extension
GenderDescription
FeedbackOpens in a new tab