Difference between revisions of "DECOR-to-FHIR-Questionnaires"

(Create a DECOR2FHIR project)
Line 10: Line 10:
  
 
==Create a DECOR2FHIR project==
 
==Create a DECOR2FHIR project==
Download the [https://sourceforge.net/p/artdecor/code-0/HEAD/tree/trunk/utilities/decor2fhir/  DECOR2FHIR] tooling to your local disk in a folder, i.e.: C:\tools\decor2fhir.
+
Download the [https://sourceforge.net/p/artdecor/code-0/HEAD/tree/trunk/utilities/decor2fhir/  DECOR2FHIR] tooling to your local disk in a folder (i.e.: C:\tools\decor2fhir).
  
 
Start with project layout
 
Start with project layout
# make a [demo1] folder in a folder next to the decor2fhir tools, i.e.: C:\tools\demo1  
+
# make a [demo1] folder in a folder next to the decor2fhir tools (i.e.: C:\tools\demo1)
 
# copy the resources folder from decor2fhir into the [demo1] folder
 
# copy the resources folder from decor2fhir into the [demo1] folder
 
# make a config folder inside the [demo1] folder
 
# make a config folder inside the [demo1] folder

Revision as of 15:44, 12 April 2017

DECOR for FHIR Questionnaires is a package to create FHIR Questionnaires straight from DECOR transactions. It is not suitable for all purposes. In general: if some part of your transaction contains concepts which map naturally onto FHIR resources (such as Patient, Medication, Practitioner), use the corresponding FHIR resources. However, many transactions contain concepts which correspond to more or less arbitrary collections of data. Examples are patient history, but also quite often data collected for statistical or reporting purposes. Those data samples do often not map neatly onto FHIR resources, since they may cross-cut resources. Questionnaires can be a versatile and capable tool to record and transfer such data.

FHIR2Questionnaire tooling will take care of:

  • resource gathering and creation (ValueSets, DataElements, Questionnaires)
  • mappings between DECOR and FHIR
  • documentation generation (index and html for Questionnaires, maps etc.)
  • schematron generation for QuestionnaireResponse validation

FHIR2Questionnaire is based on FHIR STU3

Create a DECOR2FHIR project

Download the DECOR2FHIR tooling to your local disk in a folder (i.e.: C:\tools\decor2fhir).

Start with project layout

  1. make a [demo1] folder in a folder next to the decor2fhir tools (i.e.: C:\tools\demo1)
  2. copy the resources folder from decor2fhir into the [demo1] folder
  3. make a config folder inside the [demo1] folder
  4. create a files.xml file in /config
  5. create a params.xml file in /config
  6. (or copy config from decor2fhir to demo1 as a starting point)
  7. edit the latter two to fit your project

files.xml

The files.xml should look like this:

<files>
    <base>http://decor.nictiz.nl/</base>
    <file>
        <name>Measurement</name>
        <id>2.16.840.1.113883.3.1937.99.62.3.4.2</id>
        <effectiveDate>2012-09-05T16:59:35</effectiveDate>
    </file>
</files>

The base is used to get the resources need with RetrieveTransaction and the standard FHIR interface of ART-DECOR. The file element may repeat and contains files to be retrieved. FHIR2Questionnaire requires a ART server with the FHIR package installed.

Below <base> may be a <version>2017-04-08T10:04:46</version> element if a specific version of a project is needed.

params.xml

The params.xml should look like this:

<params xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="../../decor2fhir/schemas/params.xsd">
    <fhirIdStyle value="idDisplay"/>
    <fhirCanonicalBase value="http://www.art-decor.org/fhir/"/>
    <publisher value="ART-DECOR Expert Group"/>
    <language value="en-US"/>
</params>

It contains:

  • A style for FHIR id's. Supported are:
    • idDate (FHIR id's styled '2.16.840.1.113883.3.1937.99.62.3.4.2--20120905165935' with @id and @effectiveDate)
    • idDisplay (FHIR id's styled 'demo1-dataelement-3')
  • the URI base used for FHIR canonical URI's
  • publisher
  • language for RetrieveTransaction

Getting all transaction definitions and Logical Models

Run get-resources.xsl on this file. This will:

  • get output from DECOR RetrieveTransaction and put it in /transactions
  • get output from DECOR FHIR StructureDefinition (Logical Models) and put it in LogicalModel
  • get output from DECOR FHIR ValueSets and put it in /valuesets
  • use tr2map.xsl to make concept maps from all transactions and put a map file in /map
  • make an index.html (the links will only work if the following steps are followed to generate html for Questionnaires and maps).

Making DataElements

  • (run fix-lm2.xsl on Logical Models in /LogicalModel and save to the same file, this will fix some errors and make the LM's STU3 compliant - soon to be obsoleted)
  • run sd2data-elements.xsl on all Logical Models in /LogicalModel
  • this will put a DataElement file in /DataElement

Making Questionnaires

  • run tr2quest.xsl on all (desired) xml files in /transactions
  • save as Q_[shortName].xml in /Questionnaire

Make example QuestionnaireResponse from ADA (optional)

  • Generate ADA project, make ADA XML for desired transactions
  • Run ada2questResp.xsl on ADA XML
  • this will put a QuestionnaireResponse file in /QuestionnaireResponse

Generate schematron

  • Run de2schematron on all DataElements
  • Run q2schematron on all Questionnaires
  • This will create schematron (now: only valueSet checks, more to come)

Generate more docs

  • Run q2html.xsl on all Questionnaires, this will generate documentation
  • Run map2html.xsl on maps to generate a HTML view of the maps