Skip to content

Commit

Permalink
Merge pull request #17 from Jean-Baptiste-N/Dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Jean-Baptiste-N authored Dec 5, 2024
2 parents bf85836 + 78ff19f commit bfa1649
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,15 @@ SELECT
IFNULL(CAST(evolution_percent_sejour_hospi_partielle AS FLOAT64), 0) AS evolution_percent_sejour_hospi_partielle,
IFNULL(CAST(evolution_passage_urgence AS FLOAT64), 0) AS evolution_passage_urgence,
IFNULL(CAST(evolution_percent_passage_urgence AS FLOAT64), 0) AS evolution_percent_passage_urgence,
ROUND(safe_divide((nbr_hospi * AVG_duree_hospi) , (journee_hospi_complete + sejour_hospi_partielle)),2) as taux_occupation,
ROUND(safe_divide((lit_hospi_complete + place_hospi_partielle), population)*1000,2) as taux_equipement

ROUND(safe_divide((nbr_hospi * AVG_duree_hospi) , COALESCE(journee_hospi_complete,0) + COALESCE(sejour_hospi_partielle,0)), 2) AS taux_occupation,

ROUND(
CASE
WHEN COALESCE(population, 0) = 0 THEN 0
ELSE (lit_hospi_complete + COALESCE(place_hospi_partielle, 0)) / population * 1000
END, 2
) AS taux_equipement

FROM {{ref("class_join_total_morbidite_capacite")}}
),
Expand Down

0 comments on commit bfa1649

Please sign in to comment.