Skip to content

Commit 08eeba3

Browse files
authored
Release 2.4.0 fixes (#400)
* Fixed Healthcare Visit reports mapping * PostgreSQL Flyway script fix * Bump circe-be to 1.5.0 * Evidence_job increment fix * Rollup to ancestor visit concept IDs for analysis 4020, 4021 * Update webapi.version to 2.4.0 * Revert column name change in drug_reports CTE.
1 parent d58250a commit 08eeba3

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<version>1.0.0-SNAPSHOT</version>
1010
<name>WebAPI</name>
1111
<properties>
12-
<webapi.version>2.3.0</webapi.version>
12+
<webapi.version>2.4.0</webapi.version>
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1414
<jersey.version>2.14</jersey.version>
1515
<!-- Spring Boot manages spring.version as well -->
@@ -549,7 +549,7 @@
549549
<dependency>
550550
<groupId>org.ohdsi</groupId>
551551
<artifactId>circe</artifactId>
552-
<version>1.4.0</version>
552+
<version>1.5.0</version>
553553
</dependency>
554554
<dependency>
555555
<groupId>org.json</groupId>

src/main/java/org/ohdsi/webapi/cohortresults/CohortResultsAnalysisRunner.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1676,8 +1676,8 @@ public HealthcareVisitUtilizationReport getHealthcareVisitReport(JdbcTemplate jd
16761676
s.chargedPmPm = rs.getString("charged_pmpm") == null ? null : new BigDecimal(rs.getDouble("charged_pmpm")).setScale(2, BigDecimal.ROUND_HALF_UP);
16771677
s.paid = rs.getString("paid") == null ? null : new BigDecimal(rs.getDouble("paid")).setScale(2, BigDecimal.ROUND_HALF_UP);
16781678
s.paidPmPm = rs.getString("paid_pmpm") == null ? null : new BigDecimal(rs.getDouble("paid_pmpm")).setScale(2, BigDecimal.ROUND_HALF_UP);
1679-
s.allowedChargedRatio = rs.getString("allowed_charged") == null ? null : new BigDecimal(rs.getDouble("paid_pmpm")).setScale(2, BigDecimal.ROUND_HALF_UP);
1680-
s.paidAllowedRatio = rs.getString("paid_allowed") == null ? null : new BigDecimal(rs.getDouble("paid_pmpm")).setScale(2, BigDecimal.ROUND_HALF_UP);
1679+
s.allowedChargedRatio = rs.getString("allowed_charged") == null ? null : new BigDecimal(rs.getDouble("allowed_charged")).setScale(2, BigDecimal.ROUND_HALF_UP);
1680+
s.paidAllowedRatio = rs.getString("paid_allowed") == null ? null : new BigDecimal(rs.getDouble("paid_allowed")).setScale(2, BigDecimal.ROUND_HALF_UP);
16811681

16821682
return s;
16831683
});

src/main/resources/db/migration/postgresql/V1.0.11.1__schema-executions.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ INSERT INTO ${ohdsiSchema}.analysis_execution (analysis_id, analysis_type, durat
4242
AND sec_user_id = cca.sec_user_id
4343
AND source_id = cca.source_id
4444
)
45-
ON CONFLICT DO NOTHING;
45+
;
4646

4747
ALTER TABLE ${ohdsiSchema}.input_files
48-
ADD COLUMN IF NOT EXISTS execution_id INTEGER;
48+
ADD COLUMN execution_id INTEGER;
4949

5050
UPDATE ${ohdsiSchema}.input_files f
5151
SET execution_id =
@@ -57,7 +57,7 @@ SET execution_id =
5757
LIMIT 1);
5858

5959
ALTER TABLE ${ohdsiSchema}.output_files
60-
ADD COLUMN IF NOT EXISTS execution_id INTEGER;
60+
ADD COLUMN execution_id INTEGER;
6161

6262
UPDATE ${ohdsiSchema}.output_files f
6363
SET execution_id =

src/main/resources/resources/cohortanalysis/sql/runHeraclesAnalyses.sql

+4-2
Original file line numberDiff line numberDiff line change
@@ -11166,7 +11166,7 @@ DROP TABLE #raw_de_p_4019;
1116611166
select c1.cohort_definition_id,
1116711167
c1.subject_id,
1116811168
vo1.visit_occurrence_id,
11169-
vo1.visit_concept_id,
11169+
vca.ancestor_concept_id visit_concept_id,
1117011170
vo1.visit_type_concept_id,
1117111171
cst1.cost_concept_id,
1117211172
cst1.cost_type_concept_id,
@@ -11179,6 +11179,7 @@ join @CDM_schema.visit_occurrence vo1 on c1.subject_id = vo1.person_id
1117911179
join @CDM_schema.cost cst1 on c1.subject_id = cst1.person_id
1118011180
and cst1.person_id = vo1.person_id
1118111181
and vo1.visit_occurrence_id = cst1.cost_event_id
11182+
join @CDM_schema.concept_ancestor vca on vca.descendant_concept_id = vo1.visit_concept_id
1118211183
where cost >= 0
1118311184
and currency_concept_id = 44818668
1118411185
;
@@ -11376,7 +11377,7 @@ DROP TABLE #raw_period_4020;
1137611377
select c1.cohort_definition_id,
1137711378
c1.subject_id,
1137811379
vo1.visit_occurrence_id,
11379-
vo1.visit_concept_id,
11380+
vca.ancestor_concept_id visit_concept_id,
1138011381
vo1.visit_type_concept_id,
1138111382
cst1.cost_concept_id,
1138211383
cst1.cost_type_concept_id,
@@ -11388,6 +11389,7 @@ join @CDM_schema.visit_occurrence vo1 on c1.subject_id = vo1.person_id
1138811389
and vo1.visit_start_date >= c1.cohort_start_date and vo1.visit_start_date <= c1.cohort_end_date
1138911390
join @CDM_schema.cost cst1 on c1.subject_id = cst1.person_id
1139011391
and vo1.visit_occurrence_id = cst1.cost_event_id
11392+
join @CDM_schema.concept_ancestor vca on vca.descendant_concept_id = vo1.visit_concept_id
1139111393
where cost >= 0
1139211394
and currency_concept_id = 44818668
1139311395
;
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
INSERT INTO @evidenceSchema.evidence_job SELECT MAX(id) + 1 from @evidenceSchema.evidence_job;
1+
INSERT INTO @evidenceSchema.evidence_job SELECT ISNULL(MAX(id), 0) + 1 from @evidenceSchema.evidence_job;

0 commit comments

Comments
 (0)