Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C2C-100 : Configure a minimal set of of indicators in Metabase #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
enable_embedding: false
visualization_settings: {}
dataset_query:
database: /databases/Analytics
query:
source-table: /databases/Analytics/schemas/public/tables/visit_diagnoses
filter:
- =
- - field-id
- /databases/Analytics/schemas/public/tables/visit_diagnoses/fields/coded_diagnosis
- Asthma exacerbation (J45.9)
- Moderate persistent asthma (J45.9)
- Allergic asthma (J45.0)
- Mild persistent asthma (J45.9)
- Severe persistent asthma (J45.9)
- Asthma (J45.9)
- Mild intermittent asthma (J45.9)
- Status Asthmaticus (J46)
aggregation:
- - distinct
- - field-id
- /databases/Analytics/schemas/public/tables/visit_diagnoses/fields/patient_id
type: query
name: Asthma Count
archived: false
collection_position: null
database_id: /databases/Analytics
embedding_params: null
table_id: /databases/Analytics/schemas/public/tables/visit_diagnoses
result_metadata:
- base_type: type/BigInteger
display_name: Distinct values of Patient ID
name: count
special_type: type/Quantity
fingerprint:
global:
distinct-count: 1
nil%: 0.0
type:
type/Number:
min: 1.0
q1: 1.0
q3: 1.0
max: 1.0
sd: null
avg: 1.0
query_type: query
cache_ttl: null
display: scalar
public_uuid: null
description: Asthma Count
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
enable_embedding: false
visualization_settings:
graph.show_values: true
stackable.stack_type: null
stackable.stack_display: bar
series_settings:
count:
color: '#509EE3'
graph.dimensions:
- visit_type
graph.metrics:
- count
dataset_query:
type: query
query:
source-table: /databases/Analytics/schemas/public/tables/visits
aggregation:
- - count
breakout:
- - field-id
- /databases/Analytics/schemas/public/tables/visits/fields/visit_type
database: /databases/Analytics
name: Count By Visit Type
archived: false
collection_position: null
database_id: /databases/Analytics
embedding_params: null
table_id: /databases/Analytics/schemas/public/tables/visits
result_metadata:
- base_type: type/Text
display_name: Visit Type
name: visit_type
special_type: type/Category
fingerprint:
global:
distinct-count: 2
nil%: 0.0
type:
type/Text:
percent-json: 0.0
percent-url: 0.0
percent-email: 0.0
percent-state: 0.0
average-length: 13.0
- base_type: type/BigInteger
display_name: Count
name: count
special_type: type/Quantity
fingerprint:
global:
distinct-count: 1
nil%: 0.0
type:
type/Number:
min: 1.0
q1: 1.0
q3: 1.0
max: 1.0
sd: null
avg: 1.0
query_type: query
cache_ttl: null
display: bar
public_uuid: null
description: Count By Visit Type
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
enable_embedding: false
visualization_settings: {}
dataset_query:
type: query
query:
source-table: /databases/Analytics/schemas/public/tables/visit_diagnoses
filter:
- =
- - field-id
- /databases/Analytics/schemas/public/tables/visit_diagnoses/fields/coded_diagnosis
- Type II Diabetes Mellitus with Peripheral Circulatory Disorder (E11.5)
- Pre-gestational diabetes (O24.3)
- Diabetes ketoacidosis (E14.1)
- Gestational diabetes (O24.4)
- Diabetic arthropathy (E14.6)
- Diabetes insipidus (E23.2)
- Type 2 diabetes (E11)
- Diabetic Foot (E14.6)
- Type 1 diabetes (E10)
- Diabetes (E14.9)
- Type 1 diabetic coma (E10.0)
- Type 2 diabetic coma (E11.0)
aggregation:
- - distinct
- - field-id
- /databases/Analytics/schemas/public/tables/visit_diagnoses/fields/patient_id
database: /databases/Analytics
name: Diabetes Count
archived: false
collection_position: null
database_id: /databases/Analytics
embedding_params: null
table_id: /databases/Analytics/schemas/public/tables/visit_diagnoses
result_metadata:
- base_type: type/BigInteger
display_name: Distinct values of Patient ID
name: count
special_type: type/Quantity
fingerprint:
global:
distinct-count: 1
nil%: 0.0
type:
type/Number:
min: 1.0
q1: 1.0
q3: 1.0
max: 1.0
sd: null
avg: 1.0
query_type: query
cache_ttl: null
display: scalar
public_uuid: null
description: Diabetes Count
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
enable_embedding: false
visualization_settings: {}
dataset_query:
type: query
query:
source-table: /databases/Analytics/schemas/public/tables/visit_diagnoses
filter:
- =
- - field-id
- /databases/Analytics/schemas/public/tables/visit_diagnoses/fields/coded_diagnosis
- Hypertension Complicating Pregnancy, Childbirth, Or The Puerperi (O16)
- Pre-existing hypertension complicating pregnancy and childbirth (O10.9)
- Pregnancy-induced hypertension (O13)
- Hypertensive encephalopathy (I67.4)
- Hypertensive Heart Disease (I11)
- Hypertensive crisis (I16.9)
- Portal Hypertension (K76.6)
- Hypertension (I10)
aggregation:
- - distinct
- - field-id
- /databases/Analytics/schemas/public/tables/visit_diagnoses/fields/patient_id
database: /databases/Analytics
name: Hypertensive Count
archived: false
collection_position: null
database_id: /databases/Analytics
embedding_params: null
table_id: /databases/Analytics/schemas/public/tables/visit_diagnoses
result_metadata:
- base_type: type/BigInteger
display_name: Distinct values of Patient ID
name: count
special_type: type/Quantity
fingerprint:
global:
distinct-count: 1
nil%: 0.0
type:
type/Number:
min: 1.0
q1: 1.0
q3: 1.0
max: 1.0
sd: null
avg: 1.0
query_type: query
cache_ttl: null
display: scalar
public_uuid: null
description: Hypertensive Count
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
enable_embedding: false
visualization_settings: {}
dataset_query:
type: native
native:
query: |+
SELECT count(DISTINCT person_id) FROM base_obs_query where 1 = 1 AND person_id IN (SELECT person_id FROM base_obs_query where obs_group_id IN (SELECT obs_group_id FROM base_obs_query where concept_name='Vaccinations') and value_coded_name='BCG Vaccination')

AND person_id IN (SELECT person_id FROM base_obs_query where obs_group_id IN (SELECT obs_group_id FROM base_obs_query where concept_name='Vaccinations') and value_coded_name='Measles Rubella Vaccination')

AND person_id IN (SELECT person_id FROM base_obs_query where obs_group_id IN (SELECT obs_group_id FROM base_obs_query where concept_name='Vaccinations' and value_coded_name='Oral Polio Vaccination') AND concept_name='Vaccination sequence number' and value_numeric=3)


AND person_id IN (SELECT person_id FROM base_obs_query where obs_group_id IN (SELECT obs_group_id FROM base_obs_query where concept_name='Vaccinations' and value_coded_name='Diphtheria Tetanus Pertusis Vaccination') AND concept_name='Vaccination sequence number' and value_numeric=3);

template-tags: {}
database: /databases/Analytics
name: Under 1 year fully vaccinated
archived: false
collection_position: null
database_id: /databases/Analytics
embedding_params: null
table_id: null
result_metadata:
- base_type: type/BigInteger
display_name: count
name: count
special_type: type/Quantity
fingerprint:
global:
distinct-count: 1
nil%: 0.0
type:
type/Number:
min: 1.0
q1: 1.0
q3: 1.0
max: 1.0
sd: null
avg: 1.0
query_type: native
cache_ttl: null
display: scalar
public_uuid: null
description: Under 1 year fully vaccinated
53 changes: 53 additions & 0 deletions configuration/metabase/collections/root/dashboards/General.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
points_of_interest: null
enable_embedding: false
dashboard_cards:
- sizeX: 4
series: []
col: 0
parameter_mappings: []
card_id: /collections/root/cards/Diabetes Count
visualization_settings: {}
sizeY: 4
row: 0
- sizeX: 4
series: []
col: 4
parameter_mappings: []
card_id: /collections/root/cards/Hypertensive Count
visualization_settings: {}
sizeY: 4
row: 0
- sizeX: 4
series: []
col: 8
parameter_mappings: []
card_id: /collections/root/cards/Asthma Count
visualization_settings: {}
sizeY: 4
row: 0
- sizeX: 4
series: []
col: 12
parameter_mappings: []
card_id: /collections/root/cards/Count By Visit Type
visualization_settings: {}
sizeY: 4
row: 0
- sizeX: 4
series: []
col: 0
parameter_mappings: []
card_id: /collections/root/cards/Under 1 year fully vaccinated
visualization_settings: {}
sizeY: 4
row: 4
show_in_getting_started: false
position: null
name: General
archived: false
collection_position: null
embedding_params: null
public_uuid: null
caveats: null
parameters: []
description: General
22 changes: 22 additions & 0 deletions configuration/metabase/databases/Analytics/Analytics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
points_of_interest: null
cache_field_values_schedule: 0 0 0 * * ? *
timezone: UTC
metadata_sync_schedule: 0 0 * * * ? *
is_sample: false
name: Analytics
is_on_demand: false
engine: postgres
details:
host: postgresql
port: 5432
dbname: analytics
user: analytics
password: password
ssl: false
additional-options: null
tunnel-enabled: false
is_full_sync: true
auto_run_queries: true
caveats: null
options: null
description: null
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
points_of_interest: null
visibility_type: null
schema: public
show_in_getting_started: false
name: address_hierarchy_level_default
entity_name: null
display_name: Address Hierarchy Level Default
caveats: null
active: true
entity_type: entity/GenericTable
field_order: database
description: null
Loading