Week4

WEEK4

LibreHealth

PROGRESS MADE THIS WEEK:

Advancing into the 4th week, everything is going as per the plan. By the end of this week, most of the components planned are already created.

This week (4th week) was utilised creating components for the visit workflow.

The visit workflow primarily involves the nurse and the provider along with the patient, the nurse checks the arrival of the patient, takes the vitals, verifies and creates medications and allergies.

Provider then checks the patient and performs exams and orders lab tests if necessary.

FHIR does not have a visit resource so every operation related to a visit event is handled by the modified encounter resource.

In FHIR, Appointment is used for establishing a date for the encounter,

When the patient arrives and the visit is about to start, then the appointment will be marked as fulfilled, and linked to the newly created encounter.

The following components were created for this: (other components which will be required apart from the following mentioned components are already created)

  • Encounter
  • Service Request
  • Medication Statement
  • Quantity datatype component
  • Allergy intolerance
  • Observation

The web component repo already had components for allergy and observation, but their utility was limited, moreover for every property there was a components which was actually not required as using created datatype components all the properties of any resource could be included in a single component.

A definte pattern is used for creating these components. The pattern is demonstrated below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*imports required*/
import { LitElement, html, css } from 'lit-element';

class MyCustomElement extends LitElement {

//all the properties are defined here
static get properties() {
return {
value: { type: Object, reflect: true },
}
}

constructor() {
super();
this.value = {};
}

// handle the change in input
setDisplayValue(e) {
this.value.display = e.target.value;
}

// templates to render the component
displayTemplate() {
this.value.display = this.value.display || "";
return html`<div>HELLO!</div>`
}

// render al the templates created
render() {
return html`
${this.displayTemplate()}
`
}
}

customElements.define('my-custom-element', MyCustomElement);

Here are the screenshots:

observation


servicereq


medicationstatement

allergy

encounter


next week:

  • create the remaining component.
  • implement visit workflows in the react application.

see you next week 😄.

Author

Shashwat

Posted on

2021-07-04

Updated on

2021-07-04

Licensed under