Skip to content

Commit

Permalink
Merge pull request #214 from basedosdados/staging/br_ms_cnes
Browse files Browse the repository at this point in the history
br_ms_cnes
  • Loading branch information
folhesgabriel authored Aug 3, 2023
2 parents 6b9a7cf + 3028a80 commit 12be1a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions models/br_ms_cnes/equipe.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ SAFE_CAST(ID_SEGM AS STRING) AS id_segmento,
SAFE_CAST(TIPOSEGM AS STRING) AS tipo_segmento,
SAFE_CAST(DESCSEGM AS STRING) AS descricao_segmento,
--- inserir subsrt para criar ano e mes
SAFE_CAST(SUBSRT(DT_ATIVA, 1, 4) AS STRING) AS ano_ativacao_equipe,
SAFE_CAST(SUBSRT(DT_ATIVA,5,6) AS STRING) AS mes_ativacao_equipe,
SAFE_CAST(SUBSTR(DT_ATIVA, 1, 4) AS STRING) AS ano_ativacao_equipe,
SAFE_CAST(SUBSTR(DT_ATIVA,5,6) AS STRING) AS mes_ativacao_equipe,
SAFE_CAST(MOTDESAT AS STRING) AS motivo_desativacao_equipe,
SAFE_CAST(TP_DESAT AS STRING) AS tipo_desativacao_equipe,
SAFE_CAST(SUBSRT(DT_DESAT, 1, 4) AS STRING) AS ano_desativacao_equipe,
SAFE_CAST(SUBSRT(DT_DESAT,5,6) AS STRING) AS mes_desativacao_equipe,
SAFE_CAST(SUBSTR(DT_DESAT, 1, 4) AS STRING) AS ano_desativacao_equipe,
SAFE_CAST(SUBSTR(DT_DESAT,5,6) AS STRING) AS mes_desativacao_equipe,
SAFE_CAST(QUILOMBO AS STRING) AS indicador_atende_populacao_assistida_quilombolas,
SAFE_CAST(ASSENTAD AS STRING) AS indicador_atende_populacao_assistida_assentados,
SAFE_CAST(POPGERAL AS STRING) AS indicador_atende_populacao_assistida_geral,
Expand Down
2 changes: 1 addition & 1 deletion models/br_ms_cnes/leito.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SAFE_CAST(sigla_uf AS STRING) AS sigla_uf,
SAFE_CAST(CNES AS STRING) AS id_estabelecimento_cnes,
SAFE_CAST(CODLEITO AS STRING) AS id_especialidade,
SAFE_CAST(TP_LEITO AS STRING) AS tipo_leito,
SAFE_CAST(QT_EXIST AS STRING) AS quantidade,
SAFE_CAST(QT_EXIST AS STRING) AS quantidade_total,
SAFE_CAST(QT_CONTR AS STRING) AS quantidade_contratado,
SAFE_CAST(QT_SUS AS STRING) AS quantidade_sus
FROM cnes_leito_without_duplicates
2 changes: 1 addition & 1 deletion models/br_ms_cnes/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ models:
description: Especialidade do Leito
- name: tipo_leito
description: Tipo do Leito
- name: quantidade
- name: quantidade_total
description: Quantidade de leitos existentes
- name: quantidade_contratado
description: Quantidade de leitos contratados
Expand Down

0 comments on commit 12be1a2

Please sign in to comment.