Skip to content

Instantly share code, notes, and snippets.

import React from "react";
import { match } from "react-router";
import SummaryCard from "../cards/summary-card.component";
import { fetchPatientMedications } from "./medications.resource";
import styles from "./medication-level-two.css";
import { formatDate } from "../heightandweight/heightandweight-helper";
import { createErrorHandler } from "@openmrs/esm-error-handling";
import { useCurrentPatient } from "@openmrs/esm-api";
import SummaryCardFooter from "../cards/summary-card-footer.component";
import { useTranslation } from "react-i18next";
@denniskigen
denniskigen / flat_onc_patient_history_v1_0.sql
Created December 10, 2019 11:49
Dump of the flat oncology patient history stored procedure
DELIMITER $$
CREATE DEFINER=`etl_user`@`%` PROCEDURE `generate_flat_onc_patient_history_v1_0`(IN query_type varchar(50), IN queue_number int, IN queue_size int, IN cycle_size int)
BEGIN
set @primary_table := "flat_onc_patient_history";
set @query_type = query_type;
set @total_rows_written = 0;
set @encounter_types = "(69,70,86,145,146,147,160,38,39,40,41,42,45,130,141,148,149,150,151,175,142,143,169,170,177,91,92,89,90,93,94,184)";
@denniskigen
denniskigen / mappings
Created November 7, 2019 10:09
Column name to concept type mappings
cur_visit_type answer concept mapping
1 1911 New
2 1246 Scheduled visit
cancer_type answer concept mapping
1 6485 Sarcoma
2 6514 Genitourinary cancer
3 6520 Gastrointenstinal cancer
4 6528 Head and neck cancer
5 6536 Gynecologic cancer
CREATE DEFINER=`etl_user`@`%` PROCEDURE `generate_flat_onc_htn_dm_triage_v1_0`(IN query_type VARCHAR(50), IN queue_number INT, IN queue_size INT, IN cycle_size INT)
BEGIN
SET @primary_table := "flat_onc_htn_dm_triage";
SET @query_type := query_type;
SET @total_rows_written := 0;
SET @encounter_types := "(130)";
SET @start := now();