Information about a Document instance in the HL7Connect kernel

Properties


Methods

bool Stored();
   ReadOnly: whether the Document has been stored. The Document will not have been stored if the Document has just been created using Kernel.createNewDocument or if the Document is incoming (and/or just passing through)

int PrimaryKey();
   ReadOnly: if the Document is stored, what the primary key is

HL7Connect.Cda.ClinicalDocument CDA();
   ReadOnly: a IcdaClinicalDocument that describes the CDA content

HL7Connect.Cda.Document Doc();
   ReadOnly: a IcdaClinicalDocument that describes the CDA content

HL7Connect.Cda.BaseList1 XPath(HL7Connect.Cda.Base oRoot, string sExpression);
   Select a set of objects by an XPath expression.

The first parameter is the root for the XPath expression. To start at the root of the document, pass the CDA property, or nil.

The second parameter is an XPath statement such as //v3:recordTarget/v3:patientRole/v3:id The namespace 'v3' is required on elements or the xpath won't work. Other namespaces that can be used in the XPath are xsi and the xml namespace itself.

The return value is a list of the objects that match the selected XPath statement. The objects may be any of the Cda, structured text or data types. Only objects that have an element can be selected. Although you can execute xpath statements that match text, attributes, comments etc, these will never be able to be matched to any matching object, and nothing will be returned.

For instance, executing the xpath above with the CDA document itself as the root will return the list of Iv3II identifiers for the patient.

Note that the XPath statements operate on the original parsed XML, and the XML is not updated as the object model itself is changed. So if you add an identifier to the list of patient identifiers in a script, then execute the XPath above, the new identifier will not be returned. Further, deleting an identifier from the list, then rerunning the XPath statement, and trying to access the deleted object will cause unpredictable results (technically, the link from the XML back to the object model is not reference counted)

Technical Note: The XPath expression is evaluated by the MSXML engine.

string Source();
   ReadOnly: String containing text description of the source of the Document.

string GetAnnotation(string sName);
   Get the Document annotation value for the given name.

void SetAnnotation(string sName, string sValue);
   Set the annotation value for the given name.

Name must be < 250 chars. Value may be any length, but lengths > 32 are not searchable in the web interface

You can set annotations on any Documents, but annotations are only stored when a Document is saved after being received or when a Document status is updated after a reply is received.


© Kestral Computing P/L 2000 - 2003. HL7Connect v2.00-063 generated on 30-Nov 2015.
Keywords: CDA, XPath, Document, Source, GetAnnotation, PrimaryKey, SetAnnotation, Stored, Doc, HL7Connect.Exchange.Document