Skip to main content

๐Ÿ“๐Ÿ’Š Creation of MS configurations

Why ?โ€‹

To be ready for :

  • New scenarios or changes in MS Cookbook
  • Derivative test scenarios from existing ones
  • Focus on what matter, e.g. descriptions instead of manipulate XML by hand
  • Reduce overhead with KMEHR / XML formats

Prerequisitesโ€‹

  • Clone the Github project, e.g. git clone https://github.com/smals-jy/KMEHR-tests
  • Node.JS LTS
  • Install Github project dependancies, e.g. npm install

Stepsโ€‹

  1. Create a new ts / json file in configurations/ms folder. Existing files illustrates several scenarios. Here is a sample to start your own configurations :
import type { Configuration } from "../../src/config";

export default function (): Configuration {
return {
transactions: [
{
// First transaction is reserved for MS metadata so start afterwards
id: 2,
drug: {
drugType: "compoundprescription",
compoundprescriptionText: "magistrale bereiding",
temporality: "chronic",
periodicity: "D",
beginmoment: "2023-01-01",
regimen: [
{
quantity: 1,
timeOfDay: {
dayPeriod: "duringlunch"
}
}
]
},
},
],
};
}
  1. To generate the resulting XML file(s) in output/ms folder :
npm start