Skip to content

Instantly share code, notes, and snippets.

@denniskigen
denniskigen / dev-setup.md
Created February 20, 2024 08:20
My O3 dev setup

My O3 dev setup

This is a breakdown of some of the tooling and configuration I use on my local setup to develop OpenMRS:

Tooling

import swr from 'useSWR';
const useEncounters = (patientUuid: string) => {
const url = `/ws/rest/v1/encounter`;
}
{
"name": "oncology_poc_breast_screening_form_v1.4",
"uuid": "xxxx",
"processor": "EncounterFormProcessor",
"referencedForms": [
{
"formName": "component_oncology-preclinic-review-v1.1",
"alias": "preReview",
"ref": {
"uuid": "b0fc7dac-5d1d-4a04-b238-e1976f6cb8c0",

Oncology POC Breast Cancer Screening Form v1.3

  • encounter_purpose
  • other_encounter_purpose
  • menstruation_before_age_12
  • menses_stopped_permanently
  • menses_stop_age
  • hrt_use
  • hrt_start_age
  • hrt_end_age
  • hrt_use_years
@denniskigen
denniskigen / list.json
Last active October 15, 2020 08:17
Updated regions list
{
"counties": [
{
"name": "Bomet",
"subcounties": [
{
"name": "",
"wards": []
}
]
'use strict';
const departmentProgramsConfig = require('./department-programs-config.json');
const _ = require('lodash');
var serviceDefinition = {
getAllDepartmentsConfig: getAllDepartmentsConfig,
getDepartmentPrograms: getDepartmentPrograms,
getDepartmentProgramUuids: getDepartmentProgramUuids
};
class Fibonacci implements IterableIterator<number> {
protected f1 = 0;
protected f2 = 1;
constructor(protected maxValue?: number) {}
public next(): IteratorResult<number> {
if (this.maxValue != null && current >= this.maxValue) {
return {
done: true,
class Fibonacci implements IterableIterator<number> {
protected f1 = 0;
protected f2 = 1;
constructor(protected maxValue?: number) {}
public next(): IteratorResult<number> {
if (this.maxValue != null && current >= this.maxValue) {
return {
done: true,
@denniskigen
denniskigen / mmp.sql
Last active July 17, 2020 13:57
Stored procedure for the MM program
CREATE DEFINER=`etl_user`@`%` PROCEDURE `generate_flat_multiple_myeloma_treatment_v1_2`(IN query_type varchar(50), IN queue_number int, IN queue_size int, IN cycle_size int)
BEGIN
SET @primary_table := "flat_multiple_myeloma_treatment";
SET @query_type := query_type;
SET @total_rows_written := 0;
SET @encounter_types := "(89,90,141)";
SET @clinical_encounter_types := "(89,90,141)";
SET @non_clinical_encounter_types := "(-1)";
SET @other_encounter_types := "(-1)";
CREATE DEFINER=`etl_user`@`%` PROCEDURE `generate_flat_multiple_myeloma_treatment_v1_2`(IN query_type varchar(50), IN queue_number int, IN queue_size int, IN cycle_size int)
BEGIN
-- v1.1: Add diagnosis date, serum_m_protein, treatment_plan, other_treatment_plan, remission_plan and remission_start_date columns.
-- Also modified encounter_datetime column to just encounter_date (removed the timestamp as per the myeloma team's request).
--
-- v1.2: Add identifiers, patient name and phone number columns.
-- v1.3: Add death date and assessment notes columns.
SET @primary_table := "flat_multiple_myeloma_treatment";
SET @query_type := query_type;