As related to issue 83 on github.
EBMeDS produces Reminders that have a unique Text and 0-N SuggestedActions. Each SuggestedAction carries a code and a textual descriptor.
Example:
/* | |
Esimerkkejä addSuggestedAction-funktion kutsusta käyttäen kiireellisyysluokitusta. | |
Oletettu että muuttuja actionType, actionCode, actionCodeSystem ovat määriteltyjä muualla. | |
Sallitut aikayksiköt start- ja end-elementeissä olisivat kenties (h, d, w, y) eli | |
tunnit, päivät, viikot ja vuodet. Kuukaudet voivat olla problemaattisia. | |
*/ | |
/* | |
1a. Annetaan vain loppuaika, laskettuna nykyhetkestä. Ei koodistoa käytössä. | |
*/ |
{ | |
"resourceType": "ActivityDefinition", | |
"identifier": [ | |
{ | |
"reminder": "2", | |
"rule": "scr01725" | |
} | |
], | |
"code": { | |
"coding": [ |
{ | |
"identifier": [ | |
{ | |
"reminder": "2", | |
"rule": "scr01725" | |
} | |
], | |
"code": { | |
"coding": [ | |
{ |
{ | |
"date": "2017-03-27T14:18:21.564Z", | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "instruction_text", | |
"valueString": "<a href=\"http://www.terveyskirjasto.fi/terveyskirjasto/tk.koti?p_artikkeli=dlk01167\">Itsehoito-ohje</a>." | |
}, | |
{ |
{ | |
"item": [{ | |
"answer": [{ | |
"valueDecimal": 45 | |
}], | |
"linkId": "3" | |
}, { | |
"answer": [{ | |
"valueBoolean": true | |
}], |
// QuestionnaireResponse containing all possible answer types | |
{ | |
"language": "fi", | |
"questionnaire": "SomeURI", | |
"resourceType": "QuestionnaireResponse", | |
"status": "completed", | |
"item": [ | |
{ | |
"answer": [{ | |
// e.g. age in whole years |
/** | |
* The mapping of code system codes in OID form (numbers) to URLs. FHIR wants all | |
* code systems to be given as a URL (or at least a URI/URN). This is the algorithm | |
* for determining it (https://www.hl7.org/fhir/terminologies.html#system): | |
* 1) If the code system is found in https://www.hl7.org/fhir/terminologies-systems.html use | |
* the URL provided there. | |
* 2) If the publisher of the code system has defined a specific URL to use with FHIR, use that. | |
* 3) If the code system can be found in http://registry.fhir.org/NamingSystem and its status is | |
* active, use that. | |
* 4) If an OID is registered at http://hl7.org/oid use the form 'urn:oid:[oid]' where [oid] is |
// Kun funktiolle täytyy antaa monta parametria alkaa olla vaikea muistaa niiden järjestys ja merkitys, esim | |
// esimerkkiFunktio(1, true, '123ABC', 'ABC123', 3, 6, 3) jne jne. | |
// Jos funktiolle sen sijaan annetaan yksi objekti parametrina, kaikki tiedot ovat yhä siinä, ja parametrien | |
// nimet näkyvät myös funktiokutsussa => helpompi lukea => vähemmän bugeja. | |
libQuestions.addSuggestedAction({ | |
actionType: 'OrderService', | |
actionText: 'Sairaanhoitajan vastaanotto', | |
codes: [ | |
{ | |
system: '1.2.246.537.6.49', |
// Tämä syntaksi siis rakentaa listoja ja objekteja sisäkkäin, mikä ei aina ole mahdollista kun | |
// loopataan listoja läpi niin kuin DKY:ssa. Vastaava normisyntaksi olisi: | |
// const t = {}; | |
// t.diagnoses = []; | |
// t.diagnoses.push(...) jne | |
const t = { | |
diagnoses: [ | |
{ | |
name: 'Diabetes', | |
muutaMetadataa: 'jotain', |
As related to issue 83 on github.
EBMeDS produces Reminders that have a unique Text and 0-N SuggestedActions. Each SuggestedAction carries a code and a textual descriptor.
Example: