Skip to content

Commit cc136fc

Browse files
author
marie
committed
v1
1 parent 2b7b836 commit cc136fc

37 files changed

+615
-0
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
permissions:
8+
contents: write
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Configure Git Credentials
15+
run: |
16+
git config user.name github-actions[bot]
17+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.x
21+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
22+
- uses: actions/cache@v4
23+
with:
24+
key: mkdocs-material-${{ env.cache_id }}
25+
path: ~/.cache
26+
restore-keys: |
27+
mkdocs-material-
28+
- run: pip install mkdocs-material
29+
- run: mkdocs gh-deploy --force

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
venv
2+
.idea
3+
.DS_Store
4+
generate/files/*
5+
.env

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
# codoc-data-model-docs
22
Definition and DDLs for the codoc data model
3+
4+
## Commands
5+
6+
* `mkdocs new [dir-name]` - Create a new project.
7+
* `mkdocs serve` - Start the live-reloading docs server.
8+
* `mkdocs build` - Build the documentation site.
9+
* `mkdocs -h` - Print help message and exit.
10+
11+
## Project layout
12+
13+
mkdocs.yml # The configuration file.
14+
docs/
15+
index.md # The documentation homepage.
16+
... # Other markdown pages, images and other files.

docs/assets/diagram.png

394 KB
Loading

docs/assets/favicon.png

681 Bytes
Loading

docs/assets/logo.svg

Lines changed: 6 additions & 0 deletions
Loading

docs/csv/dwh_data/dwh_data.csv

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Field,User Guide,ETL Conventions,Datatype,Required,Primary Key,Foreign Key,FK Table
2+
data_num,Unique identifier, ,bigint(64),Yes,Yes,No," "
3+
patient_num, , ,bigint(64),`Yes`,No,Yes,dwh_patient
4+
thesaurus_data_num,"The concept identifier associated with the data record (e.g., diagnosis, procedure, lab test).", ,bigint(64),`Yes`,No,Yes,dwh_thesaurus_data
5+
thesaurus_code,"The source vocabulary code corresponding to the associated concept (e.g., ICD-10, LOINC, ATC).", ,varchar(40),`Yes`,No,No," "
6+
7+
document_date,The date the data was recorded in the source system., ,timestamptz,`Yes`,No,No," "
8+
start_date,"The start date of the clinical event, observation or drugs.", ,timestamptz,`Yes`,No,No," "
9+
end_date,"The end date of the clinical event, observation or drugs, if applicable.", ,timestamptz,No,No,No," "
10+
age_patient,The age of the patient at the time of the data record., ,double(53),No,No,No," "
11+
12+
13+
val_numeric,"A numeric value associated with the data record (e.g., lab result, measurement).", ,double(53),No,No,No," "
14+
operator,"The operator applied to the value (e.g. *<*, *>*, *=*).", ,varchar(5),No,No,No," "
15+
16+
val_text,A textual or categorical value associated with the data record., ,varchar(10000),No,No,No," "
17+
18+
lower_bound,"The lower boundary of a value range, if applicable.", ,double(53),No,No,No," "
19+
upper_bound,"The upper boundary of a value range, if applicable.", ,double(53),No,No,No," "
20+
21+
22+
instance_data_id,"Code of the healthcare center, see *hospital_instance* for more informations.", ,varchar(40),No,No,No," "
23+
document_origin_code,Indicate source software for this record., ,varchar(60),No,No,No," "
24+
id_data_source,Unique identifier in source software., ,varchar(300),No,No,No," "
25+
26+
stay_num,The visit during which the data record was generated., ,bigint(64),No,No,Yes,dwh_patient_stay
27+
department_num,The service associated with the data record., ,bigint(64),No,No,Yes,dwh_thesaurus_department
28+
document_num,The identifier of the document grouping multiple related data records (e.g. all results from a lab report)., ,bigint(64),No,No,Yes,dwh_document
29+
30+
data_pid,"Optional pseudo-identifier for a data. Mainly included for structural consistency; not required for standard analytical use.",Generated as a hash of *id_data_source* combined with *data_salt*.,varchar(300),No,No,No," "
31+
data_salt,Optional random salt used in the hash algorithm to generate *data_pid*., ,varchar(300),No,No,No," "
32+
33+
upload_id,ETL Pipeline identifier,Defined at the start of the pipeline as `datetime.now().strftime("%Y%m%d%H%M%S")`,bigint(64),No,No,No," "
34+
updated_date,Last modification of this record., ,date,Yes,No,No," "
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Field,User Guide,ETL Conventions,Datatype,Required,Primary Key,Foreign Key,FK Table
2+
frequency,"Frequency of drug administration (e.g. once daily, twice daily)", ,integer(32),No,No,No," "
3+
period,The duration of the prescription or administration period., ,integer(32),No,No,No," "
4+
period_unit,"The unit of time for the period (e.g. days, weeks, months).", ,varchar(25),No,No,No," "
5+
route,"The route of drug administration (e.g. oral, intravenous).", ,varchar(50),No,No,No," "
6+
data_status,"The status of the prescription or data record (e.g. prescribed, administered, cancelled)", ,varchar(20),No,No,No," "
7+
data_unit,"The unit of measure for the drug dose (e.g. mg, mL).", ,varchar(25),No,No,No," "
8+
daily_details,"Additional structured details about daily drug administration (e.g. morning/evening, meal-related intake).", ,varchar(400),No,No,No," "
9+
drug_condition,"Indicates whether the prescription is conditional.", ,boolean,No,No,No," "
10+
drug_condition_reason,"The clinical reason or trigger for a conditional prescription (e.g., *if needed*, *if severe pain*)"., ,varchar(4000),No,No,No," "
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Field,User Guide,ETL Conventions,Datatype,Required,Primary Key,Foreign Key,FK Table
2+
activity_form,The form of activity related to the PMSI coding.,"*30* : CMP <br> *31* : Outpatient care provided by other facilities than CMP or CATTP <br> *32* : CATTP",varchar(4),No,No,No," "
3+
intersectoriel_number,Identifier for inter-sectorial linkage of PMSI episodes., ,varchar(6),No,No,No," "
4+
residency_zip_code,Patient's residency postal code as recorded in PMSI., ,integer(32),No,No,No," "

docs/csv/dwh_document.csv

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Field,User Guide,ETL Conventions,Datatype,Required,Primary Key,Foreign Key,FK Table
2+
document_num,Unique identifier, ,bigint(64),Yes,Yes,No," "
3+
patient_num, , ,bigint(64),`Yes`,No,Yes,dwh_patient
4+
title, The title of the document. , ,varchar(400),No,No,No," "
5+
document_date,The date the document was recorded., ,timestamptz,`Yes`,No,No," "
6+
document_type,"The type of the document (e.g. CR, observation, formulaire, ...)", ,varchar(100),No,No,No," "
7+
author,The person who created or authored the document, ,varchar(200),No,No,No," "
8+
displayed_text,The content of the document.,Convert to html,text,`Yes`,No,No," "
9+
age_patient,The age of the patient at the time the document was created., ,integer(32),No,No,No," "
10+
11+
stay_num,The visit during which the document was created., ,bigint(64),No,No,Yes,dwh_patient_stay
12+
department_num,The service associated with the document. , ,bigint(64),No,No,Yes,dwh_thesaurus_department
13+
unit_num,The care unit associated with the document., ,bigint(64),No,No,Yes,dwh_thesaurus_unit
14+
15+
instance_document_id,"Code of the healthcare center, see *hospital_instance* for more informations", ,varchar(40),No,No,No," "
16+
document_origin_code,Indicate source software for this document, ,varchar(60),No,No,No," "
17+
id_doc_source,Unique identifier in source software, ,varchar(300),No,No,No," "
18+
19+
document_pid,"Optional pseudo-identifier for a document. Mainly included for structural consistency; not required for standard analytical use.",Generated as a hash of *id_doc_source* combined with *document_salt*.,varchar(300),No,No,No," "
20+
document_salt,Optional random salt used in the hash algorithm to generate *document_pid*., ,varchar(300),No,No,No," "
21+
22+
upload_id,ETL Pipeline identifier,Defined at the start of the pipeline as `datetime.now().strftime("%Y%m%d%H%M%S")`,bigint(64),No,No,No," "
23+
update_date,Last modification of this record., ,date,No,No,No," "

0 commit comments

Comments
 (0)