CDA ()
CDA(TYPE, PARAMS, AS_HTML) |
Generates a HL7 CDA (Clinical Document Arquitecture) file
This FORMULA can be used to download a CDA file for certain types of objects.
Currently only Spirometry reports have been implemented
Input Parameters
Parameter | Type | Default | Required | Description |
---|---|---|---|---|
TYPE |
| Yes | Currently only “SPIRO” CDA type is implemented
| |
PARAMS |
| No | Parameters required for the generation of the CDA file. The parameters depend on the type of CDA | |
AS_HTML | false | No | By default CDA files are generated in XML format. In some cases Linkcare Platform allow to apply a XSL transformation to generate a HTML file from the XML data. if |
Return value
The FORMULA returns a URL that can be used to download the CDA file.
Execution
Always. Calculated on-the-fly whenever an ITEM of a FORM is changed (by means of form_set_answer(), or when the FORM is opened
Examples
Formula | Description |
---|---|
CDA(“SPIRO”,
{“performer”:”John Doo”,
“bas”:{
"task":15654
},
“pbd”:{
"task":15654
}) | Generate a CDA file in XML format for an spirometry. The data to generate the spirometry is defined in the JSON parameter as follows:
|
Spirometry CDA Parameters
To generate of a CDA for a spirometry it is necessary to provide certain information:
Name of the performer: It is possible to specify the name of the professional that performed the spirometry.
For BASAL and PDB spirometry:
TASK that contains the maneuvers. This TASK is used to obtain the date of the spirometry (TASK close date) and the name of the performer if no specific name has been provided in the “performer” field
FORMS containing the maneuvers.
Index of the best maneuver
This information can be provided in a JSON with the following format:
performer
: (optional) Name of the professional that performed the spirometry. If not provided, then the person assigned to the TASK containing the spirometry will be usedbas
: information about the BASAL maneuverstask
: Reference to the TASK that contains the maneuvers. This TASK reference will be used to obtain the name of the performer (if no name was provided in theperformer
parameter) and the date of the spirometry (date when the TASK was closed)forms
: array of FORM references. Each FORM must correspond to a maneuverbest
: Index of the best maneuver (base 1). If not provided, the first maneuver will be considered the best
pbd
: information about the PBD maneuverstask
: Reference to the TASK that contains the maneuvers. This TASK reference will be used to obtain the name of the performer (if no name was provided in theperformer
parameter) and the date of the spirometry (date when the TASK was closed)forms
: array of FORM references. Each FORM must correspond to a maneuverbest
: Index of the best maneuver (base 1). If not provided, the first maneuver will be considered the best
Example
{
"performer": "John Doe",
"bas": {
"task": 1212,
"forms": [21412, 21413, 21414],
"best": 1
},
"pbd": {
"task": 1213,
"forms": [21415, 21416, 21417],
"best": 1
}
}
ITEM_CODES of the maneuver values:
The values of each maneuver are retrieved from the ITEMS of each FORM that contains a maneuver. The ITEMs are expected to have specific DATACODES.
The following table shows the DATACODES expected. The name of the DATACODE can depend on the type of spirometry. The substring {type} in the following table should be replaced by “BAS” or “PBD” depending on the type of spirometry (e.g. the DATACODE “SPIRO.{type}.FVC” in a BASAL spirometry would be “SPIRO.BAS.FVC”)
DATACODE | Description |
---|---|
SPIRO.{type}.PFVC | Reference value of Forced Vital Capacity (l) |
SPIRO.{type}.PFEV1 | Reference value of Forced Expiratory Volume during 1st second (l) |
SPIRO.{type}.PPEF | Reference value of Peak Exploratory Flow (l/s) |
SPIRO.{type}.PFEF25 | Reference value of Forced Expiratory Flow at 50% of the Forced Vital Capacity (l/25 |
SPIRO.{type}.PFEF50 | Reference value of Forced Expiratory Flow at 50% of the Forced Vital Capacity (l/s) |
SPIRO.{type}.PFEF2575 | Reference value of Forced Expiratory Flow between 25% and 75% of the Forced Vital Capacity (l/s) |
SPIRO.{type}.FVC | Forced Vital Capacity (l) |
SPIRO.{type}.FEV1 | Forced Expiratory Volume in 1 seconds (l) |
SPIRO.{type}.FEV3 | Forced Expiratory Volume in 3 seconds (l) |
SPIRO.{type}.FEV6 | Forced Expiratory Volume in 6 seconds (l) |
SPIRO.{type}.QUALITY |
|
SPIRO.{type}.BE | Extrapolated Volume (l) |
SPIRO.{type}.PEFT | Peak Exploratory Flow Time (s) |
SPIRO.{type}.PEF | Peak Exploratory Flow |
SPIRO.{type}.FEF25 | Forced Expiratory Flow at 25% of the Forced Vital Capacity (l/s) |
SPIRO.{type}.FEF50 | Forced Expiratory Flow at 50% of the Forced Vital Capacity (l/s) |
SPIRO.{type}.FEF75 | Forced Expiratory Flow at 75% of the Forced Vital Capacity (l/s) |
SPIRO.{type}.FEF2575 | Forced Expiratory Flow between 25% and 75% of the Forced Vital Capacity (l/s) |
SPIRO.{type}.FET2575 |
|
SPIRO.{type}.EOTV | End Of Test Volume (l) |
SPIRO.{type}.TZERO | Time Zero Volume (l) |
SPIRO.{type}.FIF50 | Forced Inspiratory Flow as 50% of the Forced Vital Capacity (l/s) |
SPIRO.{type}.FIVC | Forced Inspiratory Vital Capacity (l) |
SPIRO.{type}.ERFP |
|
SPIRO.{type}.ERTP |
|
SPIRO.{type}.EREX |
|
SPIRO.{type}.FEV05 | Forced Expiratory Volume in 0.5 seconds (l) |
SPIRO.{type}.FET | Forced Expiratory Time (s) |
SPIRO.{type}.RANKING_SPIRO |
|
VTGRAPH_{type} | String of comma separated values of the Volume/Time graph |
FVGRAPH_{type} | String of comma separated values of the Flow/Volume graph |
FTGRAPH_{type} | String of comma separated values of the Flow/Time graph |