Class Reference
%Identity.Data.Linkage
|
|
![]() |
|||
Private Storage |
|
|
|
Agreement model, which may be either IMTPartialAgreement=0 or IMTSimpleAgreement=2
Name of property containing the username or id of the person who approved the creation of the record
Display name of assigningAuthorityPropertyA
Identifier (typically a GUID) of an assigning authority that assigns and controls the values of the sourceIDPropertyA. When specified, the sourceIDPropertyA plus the assigningAuthorityPropertyA uniquely identify an entity in relation A. It is expected that these two fields are error-free identifiers.
Blocking condition (SQL predicate) that is applied during all linkage operations. Specify this as an ordinary SQL condition on relation B, for example,"b.deceased = 'N' OR b.deceased IS NULL"An additional, more general blocking condition may optionally be passed to the
LinkN operation (See theLinkN method documentation for further details.)
Class name of relation A
Class name of relation B
Arbitrary comment attached to this linkage model. Some applications use this field to give the linkage model a name, thereby enabling linkage models to be identified by either name or linkageID
Name of property containing the username or id of the person who created the record
ObjectScript list of property names in relation A that have been deidentified.
SQL name of the property that links rows of relation A to other rows of relation A that represent the same individual, as assigned by an external system or a previous record linkage operation.
Display name of entityIDA
SQL name of the property that holds the value of the entity ID of relation B, as assigned by an external system or from a previous record linkage between relationA and relationB
Display name of the facility
Name of the property that holds the facilityCode in relation A. If the AddFacility API is used to populate facilities, then the value of this field must have a foreign key relationship with respect to the FacilityCode column of the Facility table.
Name of the property in relationA that indicates when an entity member has been "soft deleted", meaning that it has been deleted but not removed from the database.
ID of the row in the %Identity.Data.Linkage class that holds the first linkage between relation A and relation B that is compatible with this linkage. The%Identity.Data.JoinIndex class shares a join index definition across multiple linkages, saving both processor time and storage requirements. The join index may be recreated at any time by callingBuildJoinIndex
Name of link index global for relation A
Name of link index global for relation B
linkweight threshold below which candidate pairs may be automatically classified as a non-link
linkweight threshold above which candidate pairs may be automatically classified as a link
The name of the property that is used by theMergeLinks method to link records in relation A to records in relation B after a linkage operation.
LinkageID of the linkage model between relation B and relation B; that is, the linkage model that links relation B to itself.
Model name. If specified, the name must be unique within the Linkage table
obsolete (deprecated)
Name of the property in relationA that holds the %ID in relationA of the record containing the prior state of this record.
SQL name of table A
SQL name of table B
Physical schema version for this class
Display name of sourceIDPropertyA, if different from sourceIDPropertyA
Name of property containing the originating data source identifier, such as the Medical Record Number in a patient database. The sourceIDPropertyA is assigned by the corresponding AssigningAuthority. When specified, the sourceIDPropertyA plus the assigningAuthorityPropertyA uniquely identify an entity in relation A. It is expected that these two fields are error-free identifiers. Note: this field is used for real-time searching and linking, but it has no special significance for the linkage model. The sourceID and assigning authority may be added as link parameters, with the AssigningAuthority disabled, with an exact match on sourceID+AA given a maximum agreement weight and a near zero disagreement weight.
Name of the property in relation A that holds the value that shall be assigned to the EntityID of records in relation A when a record of relation A does not link to any record in relation B.
SQL predicate that evaluates to TRUE when the address is more common than would be expected for a typical residential address.
Name of property containing the date that this record was most recently updated or validated
|
Invoke ConfigureLinkage to create a new linkage model and a new link parameter for each parameter specified in plA, using the default characteristics defined in the LinkDefaults class. A linkage defines a "fuzzy join" between two classes, referred to here as class A and B, which may be the same class. clsA and clsB contain the name of class A and B, respectively. plA is a list of properties in A that are involved in the join, and tyl is a list that contains the corresponding "IMT type name" of each property in plA. In many cases it is sufficient to specify only clsA, plA, and tyl.If some of the records need to be excluded from consideration, then specify a SQL blocking condition in the bc parameter. For example, in a class that contains both persons and companies, you might want to create a linkage on only the people, or on only the companies. The blocking predicate is specified in ordinary SQL using simple conditions of the form:
andTerms :== andTerm [ AND andTerms ], where
andTerm :== a . sqlCol op b . sqlCol | b . sqlCol op literalExpr.
If property values such as 'unknown' or 'tbd' are used as placeholders for missing information, such values may be treated like SQL NULL by specifying them in the missing value lists (mvA for class A, mvB for class B). Each missing value list is a SQL fragment that will be substituted into a SQL IN expression, for example: "'unknown','tbd'"
When records are identified that represent the same individual or entity, the records are associated by giving them a common entity identifier. If the records are already associated in this way prior to performing the linkage, then the linkage operation will potentially link sets of records in class A to sets of records in class B. Specify the name of the existing entity identifier column in eiA for class A, or eiB for class B. By default the existing entity identifier is the %ID. When eiA or eiB is a unique property (such as %ID) the linkage is carried out at the record level.
The agreementModel may be specified as $$$IMTSimpleAgreement (2) or $$$IMTPartialAgreement (0). When values are compared under the simple agreement model, the full agreement or disagreement weight is applied to the outcome, or a weight of zero is used if either the A value or the B value is missing. Under the partial agreement model, "partial credit" may be attributed to values that have intermediate levels of agreement.
Parameter tuning (ptu) determines how the initial parameter weighting is determined, and may be specified as an integer between 0 and 4. Specify $$$IMTNoTuning (0) to get the default weights as specified in the LinkDefaults class. Specify $$$IMTInheritTuning (1) to use previously determined weights when another linkage exists between the same pair of classes. In this case, the weightings from most recent linkage between the same pair of classes will be used. Specify $$$IMTSemiAutoTuning (2) to select weights empirically based on the contents of the join index. Specify $$$IMTAutoTuning (3) to estimate the weights statistically using Bayes' Rule. Specify $$$IMTTuneTableTuning (4) to choose weights based on selectivity information gathered by TuneTable.
Specify the name of the link index global for class A in lxA, for example "^Sample.PersonI(""LinkIndex"")". If the class uses default storage and the link index is named "LinkIndex" (case insensitive), then lxa will default properly and need not be specified.
Parameters ending in the letter B (clsB, plB, mvB, eiB, and lxB) refer to the corresponding item in class B. If class B is not specified, then it defaults to class A, and when clsB equals clsA, all other 'B' variables also default to the value specified for the corresponding 'A' parameter.
Convert extrinsic function calls to stored procedure calls
Drop the specified linkage model and any structures that reference it. If there are multiple linkage models that share the same join index, then the join index will be deleted when the last linkage model that references it is dropped. Linkage model linkageID may not be dropped if it is referenced as "class B" by some other linkage, and there is no other linkage between the same pair of classes as linkage model linkageID.
ObjectScript interface to the real-time search operation, which returns a $list. The general interface returns a custom result set. See theLink1ResultSet class for details.Link1 returns a list of lists of potential matches having a linkweight greater than the low linkweight threshold (as specified in the linkage model), with each inner list containing the (entityID, ID, linkweight) of a potential match. If agreePatFlag=1, then the agreement pattern will be returned as a string in the 4th list element, enabling heuristic filtering to be performed if desired.If blockingPred is not null, then it must be a SQL WHERE clause fragment, and any of the records found (from "class B") must satisfy this predicate.
If distinctByEID = 1, then the results will be made distinct by entityID.
If idCommaList is specified, it must be a comma-separated list of IDs of class B. The rows referenced by the idCommaList will be included in the linkweight computation, and will be returned if the linkweight exceeds the low linkweight threshold. In this manner it is possible to provide candidate ranking even if a record cannot be located through the link index.
If thresh is specified, it will be used instead of the low linkweight threshold for this linkage model.
The Link1to1 function supports the ability to do ranking when "class A" is an object reference, and "class B" is also an object reference. Conceptually this is identical to the Link1 operation, except that in this case there are no SQL tables involved, so it cannot be treated quite like a SQL join. This function is intended for re-ranking of candidates found by different record locator services so that the linkweights are comparable to one another.
The bulk linkage operation. The LinkN operation clears the %Identity.Data.Unclassified for this linkage, finds all potential links that are not already in %Identity.Data.Classified, and creates an entry in Unclassified for each potential match it finds where the linkweight is greater than or equal to the low linkweight threshold.Just as the Link1 operation returns the (entityID, ID, linkweight, agreementPattern) for each potential link, LinkN calculates and stores the same information in Unclassified, where it can be subsequently analyzed.
If supplied, the blocking predicate (blockingPred) restricts the record pairs that are considered for linkage, and can divide a large problem into simpler subsets and enable large problems to be solved with limited resources. Refer to relation A with SQL alias "a", to relation B with SQL alias "b", or to the join index with SQL alias "ji".
For example, a blocking predicate that restricts the LinkN operation to those pairs that exactly match on postcode, year of birth, gender (or NULL), and the first character of the given name might be specified as:
(a.postcode = b.postcode AND LENGTH(a.postcode)>3 AND YEAR(a.DOB)=YEAR(b.DOB) AND a.DOB>0 AND (a.gender = b.gender OR a.gender IS NULL OR b.gender IS NULL) AND SUBSTR(a.givenName,1,1) = SUBSTR(b.givenName,1,1))Such a blocking predicate would restrict the LinkN operation to only a tiny fraction of the record pairs that would otherwise have been scored and ranked by the LinkN operation, but perhaps to a subset that contains many of the pairs of interest. A subsequent LinkN operation would be needed to process the record pairs that did not satisfy the blocking condition.
Note that the blocking predicate must be specified using the SQL column name when this is different from the class property name.
Assert that the specified object is an entity that is distinct from any other existing entities that are not linked to it.
Merge the potential links between relation A and relation B for this linkage model that have been classified as links, assigning the property specified in linkageEID the value of sourceRefA. If preserveExistingLinks=0, then the values will be overwritten, otherwise the classified pairs for linkageID will only augment the existing linkages.
Populate link parameters for this linkage.
Example of usage:
Set tLinkageID = ##class(%Identity.API).GetDefaultLinkageID()
Set pObject = ##class(%Identity.Data.Linkage).%OpenId(tLinkageID)
Do pObject.PopulateLinkParameters()
Write pObject.LinkParameters.Count()
This is a Get accessor method for theentityIDA property.
This is a Set accessor method for theentityIDA property.
This is a Get accessor method for theentityIDB property.
This is a Set accessor method for theentityIDB property.
This is a Get accessor method for therelationA property.
This is a Set accessor method for therelationA property.
This is a Get accessor method for therelationB property.
This is a Set accessor method for therelationB property.
|