Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
-
None
-
Rank:0|i002tr:
-
i2b2 Core
-
PostgreSQL
-
Firefox
Description
The concept_cd are defined in the tables "oberservation_fact" and "concept_dimension" as character varying(2000). In the temp tables "QUERY_GLOBAL_TEMP" and "DX" are the concept_cd only defined as CONCEPT_CD varchar(50). So i got the message "ERROR: value too long for type character varying(50)", wenn ich ran this query through the web cleint.
insert into QUERY_GLOBAL_TEMP (provider_id, start_date, concept_cd, instance_num, encounter_num, patient_num, panel_count)
with t as (
select f.provider_id, f.start_date, f.concept_cd, f.instance_num, f.encounter_num, f.patient_num from i2b2hqian3.observation_fact f
where f.concept_cd IN (
select concept_cd
from i2b2hqian3.concept_dimension
where concept_path LIKE '\\i2b2\\Diagnosen\\DIAGNOSE\\ICD-10-GM\\XIII\\M00-M25\\M05-M14\\M07\\M07.40\\%'
)
group by f.encounter_num ,f.instance_num, f.concept_cd,f.start_date,f.provider_id, f.patient_num
)
select t.provider_id, t.start_date, t.concept_cd, t.instance_num, t.encounter_num, t.patient_num, 0 as panel_count
from t;
insert into QUERY_GLOBAL_TEMP (provider_id, start_date, concept_cd, instance_num, encounter_num, patient_num, panel_count)
with t as (
select f.provider_id, f.start_date, f.concept_cd, f.instance_num, f.encounter_num, f.patient_num from i2b2hqian3.observation_fact f
where f.concept_cd IN (
select concept_cd
from i2b2hqian3.concept_dimension
where concept_path LIKE '\\i2b2\\Diagnosen\\DIAGNOSE\\ICD-10-GM\\XIII\\M00-M25\\M05-M14\\M07\\M07.40\\%'
)
group by f.encounter_num ,f.instance_num, f.concept_cd,f.start_date,f.provider_id, f.patient_num
)
select t.provider_id, t.start_date, t.concept_cd, t.instance_num, t.encounter_num, t.patient_num, 0 as panel_count
from t;