PATIENTS.IN Format

 

The PATIENTS.IN file is used as an interface between MedicalDirector Clinical and a billing package to transfer patient demographic data into MedicalDirector 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, MedicalDirector 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 MedicalDirector Clinical. A setting in the Link Option enables a path to be set to the PATIENTS.IN file from anywhere on the network.

MedicalDirector Clinical locks the file during reading, so if an attempt to write to the file is made while MedicalDirector 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.

  • May contain letters or numbers in character format.

  • Needs to be unique as it is used as a key to identify patients and their associated medications, history, and so forth.

  • Should be generated by the system when a new patient record is initiated.

2

TITLE

5

 

3

SURNAME

30

 

4

FIRSTNAME

30

Patient's first name.

 

For patients who go by a single name,

  • If the FIRSTNAME data is 'ONLYNAME' or '.' or Spaces, it will be identified as being a Single Name when imported into Clinical or PracSoft (via the Link File Processor, DDE, or the Import Demographics utility).

  • f the FIRSTNAME is 'ONLYNAME' or '.' when imported, it will be converted to an empty string by Clinical/PracSoft.

  • The 'Delete data in MedicalDirector Clinical' option (Link File Processor)  ignores the FIRSTNAME field.

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

  • P = Pension/HCC holder

  • R = DVA yellow card holder

  • L = DVA white card holder.

  • Blank = not specified

16

GENDER

1

  • Blank (Not Stated) - unrecognised data is also handled as if blank.

  • M (Male)

  • F (Female)

  • X (Intersex/Other) - 'O' is also read as 'Other', but never written

17

S_NET

14

Safety net Number

18

RECORD_NO

10

Record Number

  • This field corresponds to the patient's record in the paper-based files, for example the RACGP filing system.

19

LINK_TO

9

External ID of Head of Family

20

LINKCODE

1

  • A = Add

  • U = Update

  • D = Delete


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.