fr:manuals:freediams:prescription_fileformat
Keywords: fr,manuals,freediams,prescription_fileformat
Date: 2011-11-15T15:29:50+0100

## Tags explanation

### DateOfGeneration

- Date when the current document was created

### FullPrescription

- Root tag that contains the full prescription (all drugs)

### Prescription

- Root tag that contains one drug prescription

### Drug

- Root tag that contains all information about the prescribed drug (its composition, dosage, form and route of administration), including:
  - FreeDiams Uid
  - Raw source Uid1, Uid2, Uid3
  - Old raw source Uid (for 0.4.x compatibility)
  - Drugs database source Uid

#### DrugForm

- All available forms of the drug (tablet…) (this is not the selected form for the prescription)

#### DrugRoute

- Available routes of administration (this is not the selected route of administration for the prescription)

#### DrugStrength

- Global strength of the drug

#### DrugName

- Drug brand name

#### Composition

- Contains all information about the molecular component of the drug, including:
  - INN
  - Route of administration
  - Form
  - Strength
  - Nature and Nature link
  - ATC Code
  - Molecular name

### Dose

- Complete references of the prescription itself, including:
- RefDosage=“7f553b43c98d470185181bbe1ffb3f3d”
  - Uid of the recorded protocol used to create this drug prescription
- INN=“false” / “true”
  - Prescribe in INN mode (do not show the drug brand name but the INN + dose references)

#### MealTime: meal time relation with intakes

- Undefined = 0,
- NoRelationWithMeal = 1
- DuringMeal = 2
- BeforeMeal = 3
- AfterMeal = 4
- OutsideMeal = 5
- OnlyIfMeal = 6
- SeparatedFromFood = 7
- SuggestedWithFood = 8
- WithOrWithoutFood = 9

#### Period:

- PeriodScheme=“jour(s)”
- Period
  - Seconds = 0,
  - Minutes,
  - Hours,
  - Days,
  - Weeks,
  - Months,
  - Quarter,
  - Year,
  - Decade

#### Duration

- DurationFrom=“1”
- DurationTo (if needed see also DurationFromTo)
- DurationFromTo=“false” / “true”
  - Prescription uses the from x to y format in duration
- DurationScheme (not encoded, free text)
  - =“mois” / “month(s)”

- Daily=”&lt;Distribute/>”
- RouteId=“48”

#### Intake params

- IntakeFromTo=“false” / “true”
- IntakeFrom=“1”
- IntakeTo=“4”
- IntakeScheme=“gélule à libération prolongée”

- IntakeIntervalTime=“0”
- IntakeIntervalScheme=“3”

### Textual drugs

- THIS PART NEEDS UPDATE
- FreeDiams can work with two kinds of drugs:
  - Drugs identified by their FreeDiams' UID
  - Drugs created as pure textual drugs (user created)

- In the case of a pure textual drug:
  - IsTextual tag must be set as True
  - TextualDrugName tag is used to know the drug name (not the DrugName tag)

- By default this value is set to false.

### Prints

When user selected the PDF cache printing function, the prescription file will contains all the session printed documents.

Tags/attributes are:

- Printed is the tag
- file represents the path to the cache directory
- docName is the name of the cached PDF file
- dateTime is the exact date and time of the print order
- userUid is the UID of the user
- The absolute PDF file name is file + / + docName

## XML code

### Version 0.6.0

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE FreeMedForms>
    <FreeDiams>
      <DateOfGeneration version="2011-11-15T15:35:32"/>

        <Printed file="/abs/path/to/"
                 docName="file_uid.pdf"
                 dateTime="2010-11-03T10:31:42"
                 userUid="FreeDiamsUserUid"/>
        <Printed file="/abs/path/to/"
                 docName="file_uid.pdf"
                 dateTime="2010-11-03T10:46:23"
                 userUid="FreeDiamsUserUid"/>

      <FullPrescription version="0.6.0">
        <Prescription>
          <Drug u1="68166740" u2="" old="68166740" u3="" db="FR_AFSSAPS">
            <DrugForm>gélule à libération prolongée</DrugForm>
            <DrugRoute>orale</DrugRoute>
            <DrugStrength/>
            <DrugName>5-MONONITRATE D'ISOSORBIDE ETHYPHARM LP 40 mg, gélule à libération prolongée</DrugName>
            <Composition inn="ISOSORBIDE MONONITRATE" route="orale" form="gélule à libération prolongée" strength="40 mg/une gélule" nature="SA" natureLink="1" atc="C01DA14" molecularName="ISOSORBIDE (MONONITRATE D')"/>
          </Drug>
          <Dose MealTime="0" Period="1" DurationFromTo="false" RefDosage="7f553b43c98d470185181bbe1ffb3f3d" Daily="&lt;Distribute/>" DurationScheme="mois" INN="false" DurationFrom="1" IntakeIntervalScheme="3" IntakeFrom="1" IntakeIntervalTime="0" PeriodScheme="jour(s)" RouteId="48" IntakeScheme="gélule à libération prolongée" IntakeFromTo="false"/>
        </Prescription>
        <Prescription>
          <Drug u1="69422961" u2="" old="69422961" u3="" db="FR_AFSSAPS">
            <DrugForm>comprimé</DrugForm>
            <DrugRoute>orale</DrugRoute>
            <DrugStrength/>
            <DrugName>ACIDE ALENDRONIQUE ALMUS 70 mg, comprimé</DrugName>
            <Composition inn="ACIDE ALENDRONIQUE" route="orale" form="comprimé" strength="70 mg/un comprimé" nature="FT" natureLink="1" atc="M05BA04" molecularName="ACIDE ALENDRONIQUE"/>
            <Composition inn="ACIDE ALENDRONIQUE" route="orale" form="comprimé" strength="91,36 mg/un comprimé" nature="SA" natureLink="1" atc="M05BA04" molecularName="ALENDRONATE MONOSODIQUE TRIHYDRATÉ"/>
          </Drug>
          <Dose MealTime="0" Period="1" DurationFromTo="false" RefDosage="10c47af66d9041f8a80c988d8d0dcd10" Daily="&lt;Distribute/>" DurationScheme="mois" INN="false" DurationFrom="1" IntakeIntervalScheme="3" IntakeFrom="1" IntakeIntervalTime="0" PeriodScheme="jour(s)" RouteId="48" IntakeScheme="comprimé" IntakeFromTo="false"/>
        </Prescription>
        <Prescription>
          <Drug u1="61634827" u2="" old="61634827" u3="" db="FR_AFSSAPS">
            <DrugForm>poudre pour suspension buvable</DrugForm>
            <DrugRoute>orale</DrugRoute>
            <DrugStrength/>
            <DrugName>AMOXICILLINE ACIDE CLAVULANIQUE SANDOZ 100 mg/12,5 mg par ml ENFANTS, poudre pour suspension buvable en flacon (rapport amoxicilline/acide clavulanique : 8/1)</DrugName>
            <Composition inn="AMOXICILLINE" route="orale" form="poudre pour suspension buvable" strength="100 mg/1 ml de suspension reconstituée" nature="FT" natureLink="1" atc="J01CA04" molecularName="AMOXICILLINE BASE"/>
            <Composition inn="AMOXICILLINE" route="orale" form="poudre pour suspension buvable" strength="" nature="SA" natureLink="1" atc="J01CA04" molecularName="AMOXICILLINE TRIHYDRATÉE"/>
            <Composition inn="" route="orale" form="poudre pour suspension buvable" strength="12,50 mg/1 ml de suspension reconstituée" nature="FT" natureLink="2" atc="" molecularName="CLAVULANIQUE (ACIDE)"/>
            <Composition inn="" route="orale" form="poudre pour suspension buvable" strength="" nature="SA" natureLink="2" atc="" molecularName="CLAVULANATE DE POTASSIUM"/>
          </Drug>
          <Dose MealTime="0" Period="1" DurationFromTo="false" RefDosage="dfdd5947e63241e6a9d31e3018177f36" Daily="&lt;Distribute/>" DurationScheme="mois" INN="false" DurationFrom="1" IntakeIntervalScheme="3" IntakeFrom="1" IntakeIntervalTime="0" PeriodScheme="jour(s)" RouteId="48" IntakeScheme="poudre pour suspension buvable" IntakeFromTo="false"/>
        </Prescription>
      </FullPrescription>
    </FreeDiams>

### Version 0.4.x and 0.5.x

    <?xml version='1.0' encoding='UTF-8'?>
    <FreeDiams>
        <DateOfGeneration>2010-11-03T10:55:54</DateOfGeneration>
        <DrugsDatabaseName
            version="versionOfDatabase"
            provider="databaseProvider"
            complementaryWebSite="webLink"
            webLink="webLink"
            packUidName="nameOfPack_UID"
            compatWithFreeDiamsVersion="FreeDiamsVersion"
            drugUidName="NameOfDrugs_UID"
            date="DatabaseDate">FDA_US</DrugsDatabaseName>

        <Printed file="/abs/path/to/"
                 docName="file_uid.pdf"
                 dateTime="2010-11-03T10:31:42"
                 userUid="FreeDiamsUserUid"/>
        <Printed file="/abs/path/to/"
                 docName="file_uid.pdf"
                 dateTime="2010-11-03T10:46:23"
                 userUid="FreeDiamsUserUid"/>

        <FullPrescription version="0.4.0">
            <Prescription>
                <SpecifyPresentation/>
                <Drug_UID>40145001</Drug_UID>
                <DrugRoute>ORAL</DrugRoute>
                <OnlyForTest/>
                <IntakeIntervalTime>0</IntakeIntervalTime>
                <DurationFrom>1</DurationFrom>
                <DurationFromTo>false</DurationFromTo>
                <Pack_UID/>
                <Daily>&lt;Distribute/></Daily>
                <MealTime>0</MealTime>
                <SpecifyForm/>
                <Period>1</Period>
                <DrugForm>TABLET</DrugForm>
                <IsTextual>false</IsTextual>
                <IntakeIntervalScheme>3</IntakeIntervalScheme>
                <DrugStrength>1MG</DrugStrength>
                <IntakeFrom>1</IntakeFrom>
                <IntakeFullString/>
                <IntakeTo/>
                <DurationTo/>
                <IntakeFromTo>false</IntakeFromTo>
                <Note/>
                <IsAld/>
                <DurationScheme>mois</DurationScheme>
                <RefDosage>{c1bdad6d-5f1e-41cb-9fe8-43af4dc940fe}</RefDosage>
                <IntakeScheme>TABLET</IntakeScheme>
                <PeriodScheme>jour(s)</PeriodScheme>
                <DrugName>WARFARIN SODIUM (TABLET, 1MG)</DrugName>
                <INN>false</INN>
                <Composition inn="WARFARINE" route="ORAL" form="TABLET"
                             strenght="1MG" nature="SA" natureLink="1"
                             molecularName="WARFARIN SODIUM"/>
            </Prescription>
            <Prescription>
                <Drug_UID>70575001</Drug_UID>
                <DrugRoute>INHALATION, ORAL</DrugRoute>
                <DrugName>MUCOSIL-10 (SOLUTION, 10%)</DrugName>
                <OnlyForTest>true</OnlyForTest>
                <DrugForm>SOLUTION</DrugForm>
                <DrugStrength>10%</DrugStrength>
                <Composition inn="ACETYLCYSTEINE" route="INHALATION, ORAL" form="SOLUTION" strenght="10%" nature="SA" natureLink="1" molecularName="ACETYLCYSTEINE"/>
            </Prescription>
        </FullPrescription>
        <ExtraDatas>
            <PatientDatas>
                <Lastnames>data</Lastnames>
                <HeightUnit>data</HeightUnit>
                <Height>data</Height>
                <Firstnames>data</Firstnames>
                <WeightUnit>data</WeightUnit>
                <UID>data</UID>
                <Creatinine>data</Creatinine>
                <Weight>data</Weight>
                <CreatinClearance>data</CreatinClearance>
                <DateOfbirth>data</DateOfbirth>
                <CreatinineUnit>data</CreatinineUnit>
                <Gender>data</Gender>
                <DrugsInnAllergies>data;data;data</DrugsInnAllergies>
                <DrugsUidAllergies>data;data;data</DrugsUidAllergies>
                <DrugsAtcAllergies>data;data;data</DrugsAtcAllergies>
                <DrugsUidIntolerances>data;data;data</DrugsUidIntolerances>
                <DrugsAtcIntolerances>data;data;data</DrugsAtcIntolerances>
            </PatientDatas>
            <EMR uid="SessionUIDWillBeReturnedInOutputFile" name="EMRName"/>
        </ExtraDatas>
    </FreeDiams>

2010/09/27 12:09