The PATIENTS.IN file is used as an interface between MedicalDirector Clinical and a billing package to transfer patient demographic data into Clinical. The format (referred to as 'Generic ASCII v2') is most commonly used by third-party packages to implement a link to MedicalDirector Clinical and is the official standard for passing data to MedicalDirector Clinical using the link file method.
The concept is that the 'sending' application writes information to a file named PATIENTS.IN (which conforms to the 'Generic ASCII v2' specification listed below) every time a new patient is added or a patient's details edited. With the link activated, Clinical checks the PATIENTS.IN approximately every sixty seconds, and if it is not empty, reads in the contents, and clears the file. It then processes this data, and adds the information it finds to its database.
The PATIENTS.IN file does not need to reside in the same directory as Clinical. A setting in the Link Option enables a path to be set to the PATIENTS.IN file from anywhere on the computer. Note: Network Paths and Mapped Network Drives are not supported.
MedicalDirector Clinical locks the file during reading, so if an attempt to write to the file is made while Clinical has it open, it will fail and may need to be retried. Generally, MedicalDirector Clinical should only have the file open for less than 1 second, so a loop to retry for several seconds should ensure that the file can be opened.
Generic ASCII v2 Format
This is a fixed length format. Each line in the file relates to a single patient and consists of a character string terminated with a Carriage return/Line feed pair (ASCII 13 + ASCII 10).
The file can contain any number of lines (each line representing a record) as per the following format.
Field |
Name |
Length |
Description |
1 |
EXTERNAL_ID |
9 |
Unique identifying code for each patient.
|
2 |
TITLE |
5 |
|
3 |
SURNAME |
30 |
|
4 |
FIRSTNAME |
30 |
Patient's first name.
For patients who go by a single name,
|
5 |
ADDRESS |
40 |
Street and Number |
6 |
CITY |
25 |
City or Suburb |
7 |
POSTCODE |
4 |
|
8 |
DOB |
10 |
Date of birth in format dd/mm/yyyy |
9 |
MC_NO |
12 |
Medicare Number |
10 |
MC_INDEX |
1 |
Medicare Index/Reference Number |
11 |
PENS_NO |
14 |
Pension Number |
12 |
DVA NO |
14 |
DVA Number |
13 |
H_PHONE |
14 |
Home Phone Number |
14 |
W_PHONE |
14 |
Work Phone Number |
15 |
CODE |
1 |
Pension Code
|
16 |
GENDER |
1 |
|
17 |
S_NET |
14 |
Safety net Number |
18 |
RECORD_NO |
10 |
Record Number
|
19 |
LINK_TO |
9 |
External ID of Head of Family |
20 |
LINKCODE |
1 |
|
Fields are buffered with spaces (ASCII 32).
Blank fields can be contained in each line of text as long as the correct positions of the following fields are maintained.