Appearance
Getting Started
Here you will learn how to create clinical content for dot.base, e.g. your individual questionnaire. For this, you will build a FHIR resource - but don't worry, we will explain everything step by step.
We start with the Terminology (1) and continue by setting up a GitHub project (2) before you create your first MiniProject (3) and save it (4). Last, but not least we'll show you how to upload and view your MiniProject in dot.base (5).
1. Document Templates vs Section Templates
First, let's clarify two important terms, which we will frequently use: document templates
and section templates
. The screenshot below shows a document (blue) that contains multiple sections (red). Document templates
and section templates
are blueprints for these documents and sections respectively.
Let's have a closer look at the section "Procedere". The corresponding section template will contain two things: (1) The section template title which in this case is "Procedere". (2) The definition of three inputs: a single line text input with the title "Geplante diagnostische Verfahren", a single line text input with the title "Geplante therapeutische Verfahren" and a date input with the title "Nächster Termin".
The document template corresponding to the screenshot above contains two things: (1) The document template title which is not visible above but used to choose the type of document a user wants to create. (2) The references to three section templates: the "Aktuelle Anamnese", "Medication" and "Procedere" section templates.
Separating document templates from section templates gives us a modular structure. This enables section templates to be reused for multiple document templates.
2. Project Setup
Now that the terminology is out of the way, we'll set up the development environment to create document and section templates. Don't worry, it's straight forward and we've documented everything with screenshots 😉.
2.1 GitHub Account
You need a GitHub Account. On the GitHub landingpage you can either create a new account or login.
2.2 Fork our samples repository
Find our dot.base samples repository. Now you are going to create your own copy (fork) of our dot.base samples repository by forking it. No worries, just follow the steps below or watch this helpful introduction video How to fork in GitHub:
Click the arrow right next to the button (1)Fork
in the top right corner > the plus for (2)Create a new fork
.
Change the (1) Repository name
(i.g. to the name of the questionnaire you want to create) or leave it called samples
> Click (2) Create fork
.
Check, whether underneath YOUR_GITHUB_USERNAME/GIVEN_REPOSITORY_TITL
is stated that this repository is (1) forked from dot-base/samples
.
Well done, you have successfully forked a repository, which you can now work on locally!
2.3 Open the online VSCode Editor
Open the repository in the Online VSCode Editor by simply pressing .
on your keyboard. If that does not work you can also copy this URL into your browser (replace the stuff in caps): https://github.dev/YOUR_GITHUB_USERNAME/GIVEN_REPOSITORY_TITLE
. Inside the repository, open the (1) README.md
file. It contains important information on the samples' repository structure and how to use it. Read it.
Congrats, you are set-up and ready to create some templates 🎉.
3. Create your first MiniProject with document and section templates
Let's start creating your first document and section templates before diving deeper into the material of the other chapters. For now, open the directories /1-creating-clinical-content/1-mini-project
, where you will find two *.json files containing the document template and the section template of your MiniProject.
The files should looke like this:
section-template.json
{
"resourceType": "Questionnaire",
"url": "https://dotbase.org/fhir/Questionnaire/SECTION-TEMPLATE-ID",
"id": "parkinson-questionnaire-SECTION-TEMPLATE-ID",
"name": "SECTION-TEMPLATE-ID",
"title": "SECTION-TEMPLATE-TEXT",
"status": "active",
"subjectType": ["Patient"],
"publisher": "Charité – Universitätsmedizin Berlin",
"extension": [
{
"url": "https://dotbase.org/fhir/StructureDefinition/document-summary-template",
"valueMarkdown": "no markdown yet"
}
],
"item": [
{
"linkId": "explanation-group",
"type": "group",
"item": [
{
"linkId": "explanation",
"text": "SECTION-TEMPLATE-TEXT",
"type": "display"
}
]
},
{
"linkId": "date-pickers-1",
"text": "Date Pickers",
"type": "group",
"item": [
{
"linkId": "day-picker",
"text": "SECTION-TEMPLATE-TEXT",
"type": "date",
"_type": {
"extension": [
{
"url": "https://dotbase.org/fhir/StructureDefinition/questionnaire-item-type",
"valueCode": "day"
}
]
}
}
]
}
]
}
document-template.json
{
"resourceType": "PlanDefinition",
"url": "https://dotbase.org/fhir/PlanDefinition/DOCUMENT-TEMPLATE-ID",
"title": "DOCUMENT-TEMPLATE-TITLE",
"id": "parkinson-plandefinition-DOCUMENT-TEMPLATE-ID",
"description": "DOCUMENT-TEMPLATE-DESCRIPTION",
"status": "active",
"publisher": "Charité – Universitätsmedizin Berlin",
"action": [
{
"title": "DOCUMENT-TEMPLATE-TITLE",
"code": [
{
"coding": [
{
"system": "https://dotbase.org/fhir/CodeSystem/section-template-type",
"code": "questionnaire",
"display": "Questionnaire"
}
]
}
],
"definitionCanonical": "https://dotbase.org/fhir/Questionnaire/SECTION-TEMPLATE-ID",
"_definitionCanonical": {
"extension": [
{
"url": "https://dotbase.org/fhir/StructureDefinition/definition-canonical-reference",
"valueReference": {
"reference": "Questionnaire/SECTION-TEMPLATE-ID"
}
}
]
}
}
],
"extension": [
{
"url": "https://dotbase.org/fhir/StructureDefinition/document-template-maintainer",
"valueReference": {
"reference": "Organization/dotbase-organization-mainorganization"
}
}
],
"topic": {
"coding": [
{
"system": "https://dotbase.org/fhir/CodeSystem/document-template-type",
"code": "document"
}
]
}
}
Both files are ready to be downloaded and used on our demo instance. If you know what you are doing and want to customize the files right now, replace the strings in capital letters in all files and customize away. Otherwise, just continue with the next step 😉.
4. Upload your project
Now watch your MiniProject come to life. Therefore you will upload your document template and section template into the dot.base demo instance.
4.1 Login to dot.base demo instance
Open a browser (we recommend a chromium based browser like Edge or Chrome). (1) Navigate to https://demo.dotbase.org/, type in (2) username
, (3) password
and click (4) Go
to login.
4.2 Enable experimental features
Click (1) Extras
> (2) Browser tools
> (3) Tools for web developers
.
Click (1) Web Storage
, (2) Local Storage
, (3) https://demo.dotbase.org/
and finally the (4)+
button to add a new entry.
Double click the "Key" column of the new entry and name it (5) experimental_features
. Double click the "Value" column of the new entry and type (6) true
.
Reload the webpage. Now you should notice a sign in the lower right corner saying (7) Experimental features enabled
. Click (8) x
to close the developer tools window.
4.3 Upload your project using the FHIR Ressource Manager
Click (1) FHIR Ressource Manager
.
(1) Drag and Drop
your prior downloaded files document-template.json
and section-template.json
one by one. Start with the section-template.json
. Click the button (2) An den Server schicken
to upload the files. Check, whether you see your code under (3) Antwort:
without any error messages. If error messages occur, you have to edit your files, download them from your editor and upload them again.
4.4 Test your project
After every upload in the FHIR Ressource Manager, you need to refresh the website. Do that by using your browser reload button.
Disclaimer: all patients, that you can see in this screenshot, are randomly generated and don´t exist.
Click (1) Home
> (2) Alle Patient:innen durchsuchen
> any (3) patient record
.
Click (1) Neues Dokument
. Choose your questionnaire, e.g. (2) REPLACEME-TITLE
.
Fill out your own questionnare and test whether it works as expected. Also test whether you are able to save your questionnaire.
This is it. Congratulations on your first questionnaire 🎉!