The Reference object is used to access services that do not involve CLUE presenting a user interface.
Generally a client application will use a single instance of the Reference object. However, multiple instances can be created if required.
The Reference object must be created using the NewReference method of the Server object.
It is usually appropriate to create a single global instance of the Reference object in a single application program. Each application program should create a separate instance of the Reference object.
Data type: Configuration
The object handle of a Configuration object associated with the current instance of the Reference object. The property settings of the referenced Configuration object apply to searches carried out by this instance of the Reference server.
Data type: INT32 Read-only
A count of the total number of matches from the last preceding FindTerm method applied to this object. If this number cannot be determined, or is only an estimate, the FindCountAccuracy property is set accordingly.
Data type: INTEGER Read-only
Data type: Term
The handle of the Term object for a specified item in a list returned by the ListTerms method.
Data type: INT32 Read-only
A count of the total number of entries in an array generated by the last preceding ListTerms method applied to this object. If the list method is interrupted by a time-out, the list count is the total number of items at the time of the interruption (i.e. the total found so far by the initial list method and any subsequent continuations of the same list method).
Data Type: STRING
The string "Reference". The Name property has been added to all CLUE API objects to simplify debugging of client code. It can also be used to check the object type when a general object handle is used.
Data Type: INTEGER
An integer containing the error or status code generated by the last method applied to this object.
Data type: BOOLEAN Read-only
If true indicates that a search is still in progress as a result of a find or next method.
Returns a handle to a new instance of the object Term. The properties of the object are set to those appropriate to the Term specified by TermId.
The form of representation of TermId is as described for the data type RCODE.
Returns a handle to a new instance of the object Term. The properties of the object are set to those appropriate to the first Term found that contains or is pointed to by Phrase. Subsequent matches are found using the NextTerm method. See also the ListTerms method for a faster way of returning a list of matches.
Phrase is a string containing one or two words. If two words are used these are separated by a single space. The case of the characters is ignored. If only part of a word is provided, the remainder of the word is treated as wild. If an full stop or space is used at the end of a word, the complete word must match. The space between two words does not have this effect.
For example:
"mi. acute" Search for abbreviation "MI" and the word "acute" in the same term or in a keyword pointing to that term.
"peptic. ulcer." Search for a term containing the words "peptic" and "ulcer". This would match "peptic ulcer" but not "peptic ulceration".
"pept ulcer" Search for a term containing a word starting with "pept" and a word starting with "ulcer". This would match "peptic ulcer" and "peptic ulceration".
NOTE: CLUE currently assumes wild cards and does not respond to the "*" character as specified in the NHS CCC proposals. This variance will be corrected in future versions once the NHS CCC proposals have been finalised.
Returns a handle to a new instance of the object Term. The properties of the object are set to those appropriate to the next Term that contains or is pointed to by the Phrase specified in the last FindTerm method applied to this object.
If there are no more matches or if this method is applied to an object without applying the FindTerm method to the same object, a null handle is returned and the ObjErr property is set to ERR_NO_MATCH.
Returns a Visual Basicä variant data type containing an array of elements in a form suitable for display in a picking list. The form of each item in the array is determined by the value ListMode. Each element in the array is represents a term that matches the word or words in Phrase. The representation of Phrase is as specified for the FindTerm method.
Currently ListMode supports three alternative forms
| LMODE_TERM | 0 | The text of the term. |
| LMODE_TERMID_TERM | 1 | The TermId followed by the term text. |
| LMODE_READCODE_TERM | 2 | The Read Code of the concept and the term text. |
The number of elements in the returned array is available in the property ListCount.
The object handle for each of the array list elements returned is available as the property array FoundTerm.
The ListTerms method may return an incomplete search if the search takes longer than the EventInterval property of the associated Configuration object or if the internal array held by the CLUE server is full. In these cases an ERR_TIMEOUT or ERR_ARRAY_FULL error will be generated. The ListTerms method can be called again with the same set of parameters to continue the search.
The ERR_TIMEOUT error is intended to help client applications to manage the display of the list so that when the results of a search may take several seconds the client can update the display intermittently as matching items are found. Continuation of the search after an ERR_TIMEOUT does not restart the array. The array returned by each call contains the results of the first and all subsequent calls the ListTerms. The ListCount property therefore is the total number found for this search and the object handles for all the items in the list are available in the FoundTerm property array.
The ERR_ARRAY_FULL error is only returned when the array contains more than 4000 entries. In general this will exceed any practical use of this method by a wide margin. After an ERR_ARRAY_FULL error the continuation restarts the array from the next matching term. Thus the continuation call loses all references to the items already listed.
Note: The ListTerm method provides a faster alternative to the FindTerm/NextTerm approach when generating picking lists. It is readily accessible from Visual Basicä 4 but support for the variant data type in other languages may not allow easy interpretation of the returned array. In this case alternative forms for the returned data may be considered in the production version of CLUE.
Returns a handle to a new instance of the object Concept. The properties of the object are set to those