Skip to content

Commit

Permalink
core: fix typo in core__encounter.serviceType_code*
Browse files Browse the repository at this point in the history
Adds two new fields to core__encounter:
- serviceType_code
- serviceType_code_system

This leaves the two typo fields in place (until we release 3.0):
- seviceType_code
- seviceType_code
  • Loading branch information
mikix committed Apr 16, 2024
1 parent c522daa commit 939265c
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 59 deletions.
2 changes: 1 addition & 1 deletion cumulus_library/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Package metadata"""

__version__ = "2.0.0"
__version__ = "2.1.0"
12 changes: 8 additions & 4 deletions cumulus_library/studies/core/core_templates/encounter.sql.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ temp_encounter AS (
edt.code AS type_code,
edt.code_system AS type_code_system,
edt.display AS type_display,
eds.code AS seviceType_code,
eds.code_system AS seviceType_code_system,
eds.code AS serviceType_code,
eds.code_system AS serviceType_code_system,
eds.display AS serviceType_display,
edp.code AS priority_code,
edp.code_system AS priority_code_system,
Expand Down Expand Up @@ -108,8 +108,12 @@ SELECT DISTINCT
e.type_code,
e.type_code_system,
e.type_display,
e.seviceType_code,
e.seviceType_code_system,
{# deprecated: delete these next two lines once 3.0 is released -#}
e.serviceType_code AS seviceType_code,
e.serviceType_code_system AS seviceType_code_system,
{#- end deprecated section #}
e.serviceType_code,
e.serviceType_code_system,
e.serviceType_display,
e.priority_code,
e.priority_code_system,
Expand Down
10 changes: 6 additions & 4 deletions cumulus_library/studies/core/reference_sql/builder_encounter.sql
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,8 @@ temp_encounter AS (
edt.code AS type_code,
edt.code_system AS type_code_system,
edt.display AS type_display,
eds.code AS seviceType_code,
eds.code_system AS seviceType_code_system,
eds.code AS serviceType_code,
eds.code_system AS serviceType_code_system,
eds.display AS serviceType_display,
edp.code AS priority_code,
edp.code_system AS priority_code_system,
Expand Down Expand Up @@ -595,8 +595,10 @@ SELECT DISTINCT
e.type_code,
e.type_code_system,
e.type_display,
e.seviceType_code,
e.seviceType_code_system,
e.serviceType_code AS seviceType_code,
e.serviceType_code_system AS seviceType_code_system,
e.serviceType_code,
e.serviceType_code_system,
e.serviceType_display,
e.priority_code,
e.priority_code_system,
Expand Down
2 changes: 2 additions & 0 deletions docs/core-study-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ making sure to include all associated resources.
|type_display |varchar | |
|sevicetype_code |varchar | |
|sevicetype_code_system |varchar | |
|servicetype_code |varchar | |
|servicetype_code_system |varchar | |
|servicetype_display |varchar | |
|priority_code |varchar | |
|priority_code_system |varchar | |
Expand Down
Loading

0 comments on commit 939265c

Please sign in to comment.