Please enable JavaScript to view this site.

HL7 C# Script Reference

Here are some examples of CORE HL7 C# code which implements best practices.

 

 

Handling Loops and Being System Aware

 

CORE HL7 C# Scripts are VERY powerful, and it IS possible for you to write a script which causes your application to lock up, uses up the system CPU and memory resources, etc. Lets look at the first and worst cause of problems like this, and that is loops.

 

 


The using Directives

 

Whenever you create a C# script you can see the using directives which we have made part of the default script.

 

using System;

using COREHL7;

using COREHL7ScriptHost;

/* ABOVE are the using statements which are required */

using System.Collections.Generic;

using System.Linq;

using System.IO;

using System.Xml;

using System.Data;

using System.Data.SqlClient;

using System.Text;

/* ABOVE are the optional using statements you can include */

 

These directives are the ones that we KNOW will be available to you when you create your C# scripts. This means that you can create a script on a Windows 10 machine, then export it out to the latest Microsoft Windows server machine and the script WILL compile and work.

 

Can I use OTHER directives? Good question. The answer is maybe, it depends on the directive. If it is for some package that you have to retrieve from NuGet then your script MAY work on your machine, but there is no guarantee that your script will be portable to other computers. The Script Engine is a .Net Framework (4.6.2) application. That being said below is a script example which we recently did for a customer and it DOES work (at least on our machines here in the lab and the customer servers).

 

 


 

globals.Completed

 

How you use the globals.Completed value in your scripts is VERY important, especially if you are running a Type 1 script in the CORE HL7 Script Engine software.

 

 


 

 

Under Construction Check Back Soon

Under Construction Check Back Soon

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC