Dec 222010
 

There are two main components of a UDT token and four basic parts. The two main components are “The CCL Script” and “The HTML Summary Template” that the token is embedded in. The four basic parts are: “The Setup”, “The Brains”, “The Token Build”, and “The Packaged”.

The setup:

Record Structure

record reply(

1 text = vc

1 format = i4

)

The Brains:

The “Brains” is simply a select statement that requests data.

There are only three valid requests that will allow the “Brains” of the program to access the Millennium database. Those requests are:

1. Request->encntr_id

2. Request->person_id

3. Request->tracking_id

The reserved word “DETAIL” delineates the “DETAIL CLAUSE”. The Detail clause puts the result into a format that Discern Explorer can work with.

The “Token Build”

When building the token, the objective is to gather up all the data taken from the database and piece it together in the coding equivalent of a sentence or string. The string is what the program is going to send back to an HTML Summary Template in FirstNet.

The key reserved words to identify the “Token Build” section of the program are not surprisingly the CCL Build() function, or the very similar CCL concat() function. Between the parenthesis “()” of the concat() and build() functions, is where the single or multiple token data items are going to be “built” for final delivery to FirstNet.

The “Packaged Token”

The last few lines of the UDT program will fill the token.

set reply-> text = boxed up token string in the form of a single variable.

set reply-> format = 1

“Reply->text”: This is a blob of text (built token stored in Drawer 1) that will contain information to pass/deliver to the front end which is FirstNet. The text must be formatted in HTML as a single string of text, which means a single “boxed” variable as stated before.

“Reply->format”: This defines the format of the text stored in Drawer 1. By setting format equal to 1 (format = 1) the token string’s format is equal to HTML. Why is this important? This is important, because what type of files are the Patient and or Clinical Discharge Summary Templates? Each Summary Template is an HTML file. By setting “reply-> format = 1” the HTML Summary Templates know how to handle the string of text sent by the UDT program.

If you want to run your CCL program and see what the HTML looks like you will have to execute it from another program “Answer File” that provides the information required in the “Brains” section.

Here is an example of an AnswerFile.prg:

free record request go

record request

( 1 encntr_id = f8

) go

set request->encntr_id= 43808766.00 go

execute 1bh_vaccine_udt go

After you run the “Answer File” file you will have to click the “List” button to see the HTML output.