Menu Content/Inhalt
Startseite arrow Architecture arrow XID - Identifying Objects
XID - Identifying Objects Drucken
Objects used in an EMR System frequently do have many identifiers before they first come to our user's practice. A Patient might be identified by a Social Security Number, by a Health Insurance Card Number, by a Passport Number, an AHV Number and many more. This article will discuss how to handle such different identifiers.

The task of identifiing an object uniquely becomes more important as we want to share objects between different EMR systems. We might see a patient that was treated by a collegue earlier and want to receive the EMR data from this collegue. Or we want to receive laboratory values or other findings from different sources and ye be able to identify such items unambiguously.

To deal with such problems will exchanging EMR data, Elexis introduces the concept of a XID (eXternal Identifier). A XID is an identifier that consists of one or more pairs of domain/id values. A Domain is a String describing the classification system. An ID is a String that describes the given object within this classification system uniquely.

XIDs can easily be exported into an XML file. The formal description is as follows:

<complexType name="XIDType">
        <sequence>
            <element name="identity" maxOccurs="unbounded"
                minOccurs="1">
                <complexType>
                    <attribute name="domain" type="anyURI"></attribute>
                    <attribute name="value" type="string"></attribute>
                    <attribute name="quality">
                        <simpleType>
                            <restriction base="string">
                                <enumeration value="globalAssignment"></enumeration>
                                <enumeration value="regionalAssignment"></enumeration>
                                <enumeration value="localAssigment"></enumeration>
                            </restriction>
                        </simpleType>
                    </attribute>
                </complexType>
            </element>
        </sequence>
    </complexType>


In Elexis, the following API for handling XID's exists:

Xid.localRegisterXIDDomain(String domain, int quality)
This static method registers a domain for use with the XID-System. Only registered domains may be used, and any domain may only be registered once. (The method will return false if one tries to register an already registered domain).

The name for the domain is any alphanumeric string that must not contain the characters # and ; XID encourages the following rule: Use a string that is guaranteed under your control. We recommend to use an URL you own as prefix for your XID-Domains., e.g. www.elexis.ch/xids/myownXidDomain. If you do not want to use such a String, you should register your XID-Domain with www.xid.ch to avoid name conflicts.

Please note that this method will register yout domain only locally for the database where it was issued. The registration will, however, persist between program launches and workstations accessing the same elexis database.

PersistentObject#getXID(String domain)
Return the object's XID for the given Domain. E.g. getXID(Xid.DOMAIN_AHV) will return a person's AHV-Number (if defined). Attempting to retrieve an inexistent XID will return an empty String.

PersistentObject#getXID()
This will return the "best" XID (that is the XID with the highest quality value)  defined for this object. If no XID is defined, it will return simply a GUID.

PersistentObject#addXID(String Domain, String id, boolean updateIfExists)
Attribute a  new XID to this object. Only previously registered domains are valid.

Xid.findXid(String domain, String id)
find the XID denoted by the given parameners. returns null if no such XID exists.

Xid.findXID(PersistentObject ob, String domain)
find the Xid of the given object from the specified domain. Equivalent to ob.getXid(domain)

Xid.findObject(String domain, String id)
find the object indentified by the given XID of the given domain. findObject(Xid.DOMAIN_AHV,"123.45.678.9") will retrieve the Person whose AHV is 123.45.678.9 or will return null if no such object exists in the database.


 
< zurück   weiter >