Gold layer

Gold layer

Now we finally are in the final stage of our ELT process, in this layer we will see the fables that our dashboards will consume, this layer have tables group fields, dimension tables fact tables. We consume the data from the silver layer that is clean, we have one dashboard and one tab for each fact table, in this post we explain all the the table

Dimensions tables:

  • g_dim_patients
  • g_dim_rol
  • g_dim_service
  • g_dim_staff

Fact tables

  • g_patients
  • g_services_weekly
  • g_staff_schedule
  • g_staff

g_dim_patients

In this table we will see all the patients data like name and age

we took the data from the table patients of our silver layer

g_dim_rol

this dimension have the roles of the staff

in the query we took the role of the staff table of our silver layer

g_dim_service

This table have all the service of the hospital we took the data from our silver table

In this query we select all the data from service table of the silver layer

g_dim_staff

This table have the data from doctors, nurses, all the staff of the hospital.

In this query we took data form staff table of the silver layer. we have a different values of the columns of staff_id and staff_name.

g_patients

In this table we have for every service the average of days that stay in the hospital, also we have the average satisfaction of the patient and the average age of the all the patients of the hospital in addition we have the number of patients.

The query group by service, take the data from the table patients of the silver layer, and select the column service and do 3 average for the columns : days_stayed , satisfaction and age also we did a count distinct of the patients id.

g_services_weekly

Here in this table we see how many patients was refused and the low morale of the staff for every service and month.

in this query we group by service and month and we sum the quantity of patients refused also we take the min value of the staff morale in addition we take the data from the service_weekly of the silver layer.

g_staff_schedule

Here in this fact table we control the absenteeism of the hospital’s staff.

The query group by staff_id , role and service and make a sum of the column present if present is equal to one is present y not is absent in addition we take data from staff_schedule of the silver layer

g_staff

The table staff of the golden table show us how many personnel we have by role and service

The query group by role and service and count the personnel in the staff table of the silver layer

Links:

Comments

Leave a Reply