Using FreeDiams with another software (EMR)

FreeDiams is thought as an external "module". This "module" can be used by many software. At present, MedinTux and GNUMed are configurable to use this software as a prescriber.

In order to interface software with FreeDiams, just learn the command line params and use exchange files.

Params of the command line

The following settings are available:

Not yet documented :

Examples :

The "in" exchange file

All files are UTF-8 encoded.
Instead of using the command line to learn the various parameters used in FreeDiams, the EMRs can use an XML encoded exchange file.
When you specify a in exchange file, the command line params are replaced with the XML values. You can use both (command line and xml in file) to define params to pass to FreeDiams.
The structure of this file must meet the following requirements.

XML structuration of the "in" exchange file

<FreeDiams_In version="0.4.0">
  <ConfigFile value="/path/to/the/requiered/configFile.ini"/>
  <OutFile value="/path/to/the/requiered/exchange_File.txt" format="xml html html_xml"/>
  <DrugsDatabase uid="FREEDIAMS_DRUGS_DATABASE_UID"/>
  <EMR name="NameOfTheCallingEMR" uid="SessionUIDWillBeReturnedInOutputFile"/>
  <Patient>
    <Identity name="Name Of Patient" secondname="" surname="James" uid="EMR Patient's UID" dob="yyyy/MM/dd" gender="M or F or H"/>
    <Creatinine value="12" unit="mg/l or mmol/l"/>
    <Weight value="70" unit="kg or lbs" />
    <Height value="170" unit="cm or "/>
    <InnAllergies value="inn1;inn2;inn3"/>
    <ATCAllergies value="ATC1;ATC2;ATC3"/>
    <DrugsUidAllergies value="7655668;876769;656789"/>
    <ICD10 value="J11.0;A22;Z23"/>
  </Patient>
  <Ui editmode="select-only or prescriber" blockPatientDatas="0/1"/>
</FreeDiams_In>

Defaults

The "out" exchange file

When a swap file is notified, FreeDiams tries to read the file contents and to retrieve data from the prescription.
At the close of the application, the prescription is stored in the exchange format XML. See Prescription file format.
When the --medintux is notified in the command line, the format of the paging file is specific to MedinTux.
The contents of the 'out' exchange file is a mix between HTML and XML.

File format

Till v0.4.0, the out exchange file is structured like this.

<html>
  ...
<body>
<a href="FreeDiamsEncodedPrescription:base64FreeDiamsXmlencoded">
... (full HTML prescription)
</a>
</body>
</html>

For versions upper or egal to 0.4.0 :

<html>
   ...
  <meta name="FreeDiams" content="FreeDiamsEncodedPrescription:base64FreeDiamsXmlencoded"/>
<body>
... (full HTML prescription)
</body>
</html>

Command line specific params

Some actions require the activation parameters of the command line.
To assist in debugging the application when it seems slow: --chrono help to find the slowdown.
The editors of standard dosages, can transmit their dosages to scientific committee to confirm with the --transmit-dosage param.

User manual - FreeDiams