Data model

"AFFILIATION_STRATEGY_RULE" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "account_id": UUID 
  "action": VARCHAR(255) 
  "company_id": VARCHAR(36) 
  "is_missing_siret": BOOLEAN 
  "name": TEXT 
  "siret": VARCHAR(14) 
}
"OCCUPATIONAL_HEALTH_PROFILE" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "global_profile_id": UUID 
  "is_vip": BOOLEAN 
  "medical_secrecy_worker_record_id": UUID 
}
"OCCUPATIONAL_HEALTH_ADMINISTRATIVE_PROFILE" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "health_data_sharing_consent": BOOLEAN 
  "medical_record_access_consent": BOOLEAN 
  "medical_record_sharing_consent": BOOLEAN 
  "notes": VARCHAR 
  "profile_id": UUID 
  "video_consultation_consent": BOOLEAN 
  "worker_health_status": ARRAY 
}
"OCCUPATIONAL_HEALTH_AFFILIATION_DECISION" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "core_employment_id": UUID 
  "decision": VARCHAR(255) 
  "employment_change_payload": JSONB 
  "manual_decision": VARCHAR(255) 
  "profile_id": UUID 
  "rule_id": UUID 
}
"OCCUPATIONAL_HEALTH_AFFILIATION_MOVEMENT" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "account_id": UUID 
  "affiliation_decision_id": UUID 
  "core_employment_id": UUID 
  "employment_change_payload": JSONB 
  "movement_type": VARCHAR(255) 
  "profile_id": UUID 
}
"OCCUPATIONAL_HEALTH_HEALTH_PROFESSIONAL" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "first_name": TEXT 
  "last_name": TEXT 
  "role": TEXT 
}
"OCCUPATIONAL_HEALTH_JOB" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "employer": VARCHAR(255) 
  "end_date": DATE 
  "is_past_job": BOOLEAN 
  "medical_secrecy_worker_job_id": UUID 
  "profile_id": UUID 
  "start_date": DATE 
  "title": VARCHAR(255) 
}
"OCCUPATIONAL_HEALTH_MASS_AFFILIATION_LOG" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "account_id": UUID 
  "affiliation_id": UUID 
  "extra_data": JSONB 
  "profile_id": UUID 
  "start_date": DATE 
}
"OCCUPATIONAL_HEALTH_PROFILE_SITUATION" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "account_id": UUID 
  "profile_id": UUID 
  "risk_category": VARCHAR(255) 
}
"OCCUPATIONAL_HEALTH_VISIT" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "cancellation_reason": VARCHAR(255) 
  "health_professional_id": UUID 
  "managed_by_prevenir": BOOLEAN 
  "profile_id": UUID 
  "visit_date": DATE 
  "visit_end_datetime": DATETIME 
  "visit_setup": VARCHAR(255) 
  "visit_start_datetime": DATETIME 
  "visit_type": VARCHAR(255) 
  "work_stoppage_reason": VARCHAR(255) 
}
"THESAURUS_MEAN" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "label": VARCHAR 
}
"OCCUPATIONAL_HEALTH_WORKSPACE_ACTION" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "account_id": UUID 
  "actor_full_name": TEXT 
  "ended_at": DATETIME 
  "eta_date": DATETIME 
  "note": TEXT 
  "prevention_type": VARCHAR(255) 
  "profile_id": UUID 
  "started_at": DATETIME 
  "status": VARCHAR(255) 
  "thesaurus_mean_id": UUID 
  "title": TEXT 
  "type": VARCHAR(255) 
}
"THESAURUS_OCCUPATIONAL_EXPOSURE" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "class_notation": VARCHAR 
  "dc_type": VARCHAR(255) 
  "label": VARCHAR 
  "line_number": INTEGER 
  "notation": VARCHAR 
  "parent_notation": VARCHAR 
  "risk_category": VARCHAR(255) 
  "status": VARCHAR(255) 
  "subclass_notation": VARCHAR 
  "version": VARCHAR 
}
"TURING_OCCUPATIONAL_HEALTH_ON_DEMAND_VISIT" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "account_id": UUID 
  "additional_comments": TEXT 
  "attestation_de_suivi_to_fill": BOOLEAN 
  "avis_aptitude_to_fill": BOOLEAN 
  "avis_inaptitude": BOOLEAN 
  "date_fixed": BOOLEAN 
  "date_planned": DATE 
  "email_sent": BOOLEAN 
  "hour_booked": VARCHAR(10) 
  "hp_visit_owner_id": UUID 
  "hr_informed": BOOLEAN 
  "if_avis_comments": TEXT 
  "if_on_demand_visit_specify_motive": TEXT 
  "if_pre_return_visit_specify_request_initiator": TEXT 
  "if_return_visit_specify_motive": TEXT 
  "is_employee_submitting_the_request": VARCHAR(255) 
  "is_hr_informed": VARCHAR(255) 
  "next_visit_date": VARCHAR(255) 
  "notes": TEXT 
  "person_submitting_request": VARCHAR(255) 
  "return_to_work_date": DATE 
  "status": VARCHAR(255) 
  "submitted_at": DATETIME 
  "timestamp_planned": DATETIME 
  "updated_risk_category": VARCHAR(255) 
  "user_id": VARCHAR(255) 
  "utm_source": VARCHAR(255) 
  "visit_format": VARCHAR(255) 
  "visit_planned": BOOLEAN 
  "visit_type": VARCHAR(255) 
  "work_stoppage_end_date": DATE 
  "work_stoppage_start_date": DATE 
}
"TURING_OCCUPATIONAL_HEALTH_PREDICTABLE_VISIT" {
  shape: sql_table
  "id": UUID {constraint: primary_key}
  "account_id": UUID 
  "admin_warning_no_visit": VARCHAR 
  "attestation_de_suivi_to_fill": BOOLEAN 
  "avis_aptitude_to_fill": BOOLEAN 
  "booked": BOOLEAN 
  "current_risk_category": VARCHAR(255) 
  "date_planned": DATE 
  "date_sent": DATE 
  "hour_booked": VARCHAR(10) 
  "hp_visit_owner_id": UUID 
  "if_avis_comments": TEXT 
  "next_visit_date": VARCHAR(255) 
  "status": VARCHAR(255) 
  "timestamp_planned": DATETIME 
  "updated_risk_category": VARCHAR(255) 
  "user_id": VARCHAR(255) 
  "visit_type": VARCHAR(255) 
}
"OCCUPATIONAL_HEALTH_PROFILE"."id" -> "OCCUPATIONAL_HEALTH_ADMINISTRATIVE_PROFILE"."profile_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"AFFILIATION_STRATEGY_RULE"."id" -> "OCCUPATIONAL_HEALTH_AFFILIATION_DECISION"."rule_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_PROFILE"."id" -> "OCCUPATIONAL_HEALTH_AFFILIATION_DECISION"."profile_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_AFFILIATION_DECISION"."id" -> "OCCUPATIONAL_HEALTH_AFFILIATION_MOVEMENT"."affiliation_decision_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_PROFILE"."id" -> "OCCUPATIONAL_HEALTH_AFFILIATION_MOVEMENT"."profile_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_PROFILE"."id" -> "OCCUPATIONAL_HEALTH_JOB"."profile_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_PROFILE"."id" -> "OCCUPATIONAL_HEALTH_MASS_AFFILIATION_LOG"."profile_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_PROFILE"."id" -> "OCCUPATIONAL_HEALTH_PROFILE_SITUATION"."profile_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_HEALTH_PROFESSIONAL"."id" -> "OCCUPATIONAL_HEALTH_VISIT"."health_professional_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_PROFILE"."id" -> "OCCUPATIONAL_HEALTH_VISIT"."profile_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_PROFILE"."id" -> "OCCUPATIONAL_HEALTH_WORKSPACE_ACTION"."profile_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"THESAURUS_MEAN"."id" -> "OCCUPATIONAL_HEALTH_WORKSPACE_ACTION"."thesaurus_mean_id": {
  source-arrowhead.shape: cf-one-required
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_HEALTH_PROFESSIONAL"."id" -> "TURING_OCCUPATIONAL_HEALTH_ON_DEMAND_VISIT"."hp_visit_owner_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
"OCCUPATIONAL_HEALTH_HEALTH_PROFESSIONAL"."id" -> "TURING_OCCUPATIONAL_HEALTH_PREDICTABLE_VISIT"."hp_visit_owner_id": {
  source-arrowhead.shape: cf-one
  target-arrowhead.shape: cf-many
}
Hold "Alt" / "Option" to enable pan & zoom