Giter Site home page Giter Site logo

promptly's Introduction

promptly

Modeling

model drawio

I believe it can be modeled in normar start schema with fct table has surrogate keys and two measure blood and weight and multiple dimensions.

Dimension decision can be decided based on the query patterns that is needed for users

1.1 we can try select age, avg(blood_pressure) from fct_appointment f left join dim_patient d on sk_patient = d.sk_patient group by 1

1.2 we can try select disease_name, min(weight), avg(weight), max(weight) from fct_appointment f left join dim_disease d on f.sk_disease = d.sk_disease group by 1

1.3 we can try select week_number, count(*) from fct_appointment f left join dim_date d on f.sk_date = d.sk_date group by 1

  1. it can be added as columns to the fact if it is one 1 row per appointment

  2. it will be added to dimension patient but we need to answer some questions like are we going to show the last transaction per patient, but it is slowly changing dimension problem and we need to pick which type

3.1 -->last address and activity level - type 1 3.2 -->maintain history and add flags (is_ current) - type 2 3.3 -->add previous column - type 3 3.4 -->create a history table - type 4

Code Review

I tried to make the code to be more modular so it can be reused, also hide column logics in functions

promptly's People

Contributors

mahmoudmosleh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.