You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by "Mullane, Sean *HS" <SP...@hscmail.mcc.virginia.edu> on 2017/04/05 16:32:07 UTC

YTEX doc_date field not populating

I have a modified descriptor that is populating several fields in the "document" table in our YTEX database. I have been able to populate all the fields I am interested in except doc_date. I haven't been able to figure out why this is. The note_entry_dtm field that is supposed to populate doc_date has type datetime. Can anyone shed any light on this?

System:
cTAKES 3.2.2
YTEX database set up on MS SQL Server 2012
Java 1.8

Descriptor: DBCollectionReader.xml
Consumer: DBConsumer.xml

Document table schema:
table_name       column_name                   IS_NULLABLE     data_type
document           document_id                     NO                         int
document           instance_id                         NO                         bigint
document           instance_key                     YES                         varchar
document           analysis_batch                  NO                         varchar
document           cas                                          YES                         varbinary
document           doc_text                              YES                         nvarchar
document           pat_enc_csn_id                YES                         int
document           doc_date                             YES                         datetime
document           sk_Entry_Dte                    YES                         int
document           document_type_name YES                         varchar
document           patient_id                           YES                         varchar

Query Get Document Keys:
select cast(txt.NOTE_ID as bigint) instance_id, txt.pat_id PATIENT_ID, cnote.PAT_ENC_CSN_ID, cnote.Note_Entry_Dtm doc_date, cnote.sk_Entry_Dte, typ.Note_Typ_IP_Nme document_type_name
from Rptg.Clrt_Note_Txt txt
inner join Rptg.vwFact_Pt_Enc_Clrt_Note cnote                 on txt.sk_Fact_Pt_Enc_Clrt_Note = cnote.sk_Fact_Pt_Enc_Clrt_Note
inner join Rptg.vwDim_Clrt_Note_Typ_IP typ                    on cnote.sk_Dim_Clrt_Note_Typ_IP = typ.sk_Dim_Clrt_Note_Typ_IP
where cnote.Note_Entry_Dtm between '2016-10-01' and '2016-10-07'

Query Get Document:
select Note_text
from Rptg.Clrt_Note_Txt txt
inner join Rptg.vwFact_Pt_Enc_Clrt_Note cnote                 on txt.sk_Fact_Pt_Enc_Clrt_Note = cnote.sk_Fact_Pt_Enc_Clrt_Note
inner join Rptg.vwDim_Clrt_Note_Typ_IP typ                    on cnote.sk_Dim_Clrt_Note_Typ_IP = typ.sk_Dim_Clrt_Note_Typ_IP
where txt.NOTE_ID = :instance_id

Thanks,
Sean