Skip to content

Commit

Permalink
Use Worklist Label (0074,1202) instead of MWL SCP AET for separating…
Browse files Browse the repository at this point in the history
… MWL #4015
  • Loading branch information
gunterze committed Apr 5, 2023
1 parent fcf7aa2 commit 3c396e5
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dcm4chee-arc-entity/src/bin/patch-create-firebird.awk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BEGIN { FS = "[ )]" }
} else if ($3 == "task") {
print "create table task (pk numeric(18,0) not null, batch_id varchar(64), check_different smallint, check_missing smallint, compare_fields varchar(64), completed integer, created_time timestamp not null, destination_aet varchar(64), device_name varchar(64) not null, different integer not null, error_comment varchar(255), error_msg varchar(255), exporter_id varchar(64), failed integer, local_aet varchar(64), matches integer not null, missing integer not null, modalities varchar(255), num_failures integer not null, num_instances integer, outcome_msg varchar(255), payload blob, proc_end_time timestamp, proc_start_time timestamp, query_str varchar(255), queue_name varchar(64) not null, remaining integer, remote_aet varchar(64), rq_uri varchar(4000), rq_host varchar(255), rq_user_id varchar(255), scheduled_time timestamp not null, series_iuid varchar(64), sop_iuid varchar(64), task_status integer not null, status_code integer, storage_ids varchar(64), stgcmt_policy integer, study_iuid varchar(64), task_type integer not null, update_location_status smallint, updated_time timestamp not null, version numeric(18,0), warning integer not null, primary key (pk));"
} else if ($3 == "mwl_item") {
print "create table mwl_item (pk numeric(18,0) not null, accession_no varchar(16) not null, accno_entity_id varchar(64), accno_entity_uid varchar(64), accno_entity_uid_type varchar(64), admission_id varchar(64) not null, admid_entity_id varchar(64), admid_entity_uid varchar(64), admid_entity_uid_type varchar(16), created_time timestamp not null, institution varchar(64) not null, department varchar(64) not null, local_aet varchar(16) not null, modality varchar(16) not null, req_proc_id varchar(16) not null, sps_id varchar(16) not null, sps_start_date varchar(16) not null, sps_start_time varchar(16) not null, sps_status integer not null, study_iuid varchar(64) not null, updated_time timestamp not null, version numeric(18,0), dicomattrs_fk numeric(18,0) not null, inst_code_fk numeric(18,0), dept_code_fk numeric(18,0), patient_fk numeric(18,0) not null, perf_phys_name_fk numeric(18,0), primary key (pk));"
print "create table mwl_item (pk numeric(18,0) not null, accession_no varchar(16) not null, accno_entity_id varchar(64), accno_entity_uid varchar(64), accno_entity_uid_type varchar(64), admission_id varchar(64) not null, admid_entity_id varchar(64), admid_entity_uid varchar(64), admid_entity_uid_type varchar(16), created_time timestamp not null, institution varchar(64) not null, department varchar(64) not null, modality varchar(16) not null, req_proc_id varchar(16) not null, sps_id varchar(16) not null, sps_start_date varchar(16) not null, sps_start_time varchar(16) not null, sps_status integer not null, study_iuid varchar(64) not null, updated_time timestamp not null, version numeric(18,0), worklist_label varchar(64) not null, dicomattrs_fk numeric(18,0) not null, inst_code_fk numeric(18,0), dept_code_fk numeric(18,0), patient_fk numeric(18,0) not null, perf_phys_name_fk numeric(18,0), primary key (pk));"
} else if ($3 == "rejected_instance") {
print "create table rejected_instance (pk numeric(18,0) not null, created_time timestamp not null, series_iuid varchar(64) not null, sop_cuid varchar(64) not null, sop_iuid varchar(64) not null, study_iuid varchar(64) not null, reject_code_fk numeric(18,0), primary key (pk));"
} else if ($3 == "patient_id") {
Expand Down
4 changes: 2 additions & 2 deletions dcm4chee-arc-entity/src/main/resources/sql/db2/create-db2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ create table key_value2 (pk bigint generated by default as identity, content_typ
create table location (pk bigint generated by default as identity, created_time timestamp not null, digest varchar(255), multi_ref integer, object_type integer not null, object_size bigint not null, status integer not null, storage_id varchar(255) not null, storage_path varchar(255) not null, tsuid varchar(255), uidmap_fk bigint, instance_fk bigint, primary key (pk));
create table metadata (pk bigint generated by default as identity, created_time timestamp not null, digest varchar(255), object_size bigint not null, status integer not null, storage_id varchar(255) not null, storage_path varchar(255) not null, primary key (pk));
create table mpps (pk bigint generated by default as identity, accession_no varchar(255) not null, accno_entity_id varchar(255), accno_entity_uid varchar(255), accno_entity_uid_type varchar(255), created_time timestamp not null, pps_start_date varchar(255) not null, pps_start_time varchar(255) not null, sop_iuid varchar(255) not null, pps_status integer not null, study_iuid varchar(255) not null, updated_time timestamp not null, version bigint, dicomattrs_fk bigint not null, discreason_code_fk bigint, patient_fk bigint not null, primary key (pk));
create table mwl_item (pk bigint generated by default as identity, accession_no varchar(255) not null, accno_entity_id varchar(255), accno_entity_uid varchar(255), accno_entity_uid_type varchar(255), admission_id varchar(255) not null, admid_entity_id varchar(255), admid_entity_uid varchar(255), admid_entity_uid_type varchar(255), created_time timestamp not null, institution varchar(255) not null, department varchar(255) not null, local_aet varchar(255) not null, modality varchar(255) not null, req_proc_id varchar(255) not null, sps_id varchar(255) not null, sps_start_date varchar(255) not null, sps_start_time varchar(255) not null, sps_status integer not null, study_iuid varchar(255) not null, updated_time timestamp not null, version bigint, dicomattrs_fk bigint not null, inst_code_fk bigint, dept_code_fk bigint, patient_fk bigint not null, perf_phys_name_fk bigint, primary key (pk));
create table mwl_item (pk bigint generated by default as identity, accession_no varchar(255) not null, accno_entity_id varchar(255), accno_entity_uid varchar(255), accno_entity_uid_type varchar(255), admission_id varchar(255) not null, admid_entity_id varchar(255), admid_entity_uid varchar(255), admid_entity_uid_type varchar(255), created_time timestamp not null, institution varchar(255) not null, department varchar(255) not null, modality varchar(255) not null, req_proc_id varchar(255) not null, sps_id varchar(255) not null, sps_start_date varchar(255) not null, sps_start_time varchar(255) not null, sps_status integer not null, study_iuid varchar(255) not null, updated_time timestamp not null, version bigint, worklist_label varchar(255) not null, dicomattrs_fk bigint not null, inst_code_fk bigint, dept_code_fk bigint, patient_fk bigint not null, perf_phys_name_fk bigint, primary key (pk));
create table patient (pk bigint generated by default as identity, created_time timestamp not null, failed_verifications integer not null, num_studies integer not null, pat_birthdate varchar(255) not null, pat_custom1 varchar(255) not null, pat_custom2 varchar(255) not null, pat_custom3 varchar(255) not null, pat_sex varchar(255) not null, updated_time timestamp not null, verification_status integer not null, verification_time timestamp, version bigint, dicomattrs_fk bigint not null, merge_fk bigint, patient_id_fk bigint, pat_name_fk bigint, resp_person_fk bigint, primary key (pk));
create table patient_demographics (pat_id varchar(255) not null, pat_birthdate varchar(255), pat_name varchar(255), pat_sex varchar(255), primary key (pat_id));
create table patient_id (pk bigint generated by default as identity, pat_id varchar(255) not null, pat_id_type_code varchar(255), entity_id varchar(255), entity_uid varchar(255), entity_uid_type varchar(255), version bigint, primary key (pk));
Expand Down Expand Up @@ -73,7 +73,7 @@ create unique index UK_cyqglxijg7kebbj6oj821yx4d on mpps (sop_iuid);
alter table mwl_item add constraint UK_6qj8tkh6ib9w2pjqwvqe23ko unique (dicomattrs_fk);
create unique index UK_lerlqlaghhcs0oaj5irux4qig on mwl_item (study_iuid, sps_id);
create index UK_d0v5hjn1crha2nqbws4wj0yoj on mwl_item (updated_time);
create index UK_9ockpkbetj7a97for0s1jhasi on mwl_item (local_aet);
create index UK_88bqeff7thxsmgcmtrg5l3td on mwl_item (worklist_label);
create index UK_2odo3oah39o400thy9bf0rgv0 on mwl_item (sps_id);
create index UK_kedi0qimmvs83af3jxk471uxn on mwl_item (req_proc_id);
create index UK_fpfq8q514gsime2dl8oo773d4 on mwl_item (study_iuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ create table key_value2 (pk numeric(18,0) not null, content_type varchar(255) no
create table location (pk numeric(18,0) not null, created_time timestamp not null, digest varchar(255), multi_ref integer, object_type integer not null, object_size numeric(18,0) not null, status integer not null, storage_id varchar(255) not null, storage_path varchar(255) not null, tsuid varchar(255), uidmap_fk numeric(18,0), instance_fk numeric(18,0), primary key (pk));
create table metadata (pk numeric(18,0) not null, created_time timestamp not null, digest varchar(255), object_size numeric(18,0) not null, status integer not null, storage_id varchar(255) not null, storage_path varchar(255) not null, primary key (pk));
create table mpps (pk numeric(18,0) not null, accession_no varchar(255) not null, accno_entity_id varchar(255), accno_entity_uid varchar(255), accno_entity_uid_type varchar(255), created_time timestamp not null, pps_start_date varchar(255) not null, pps_start_time varchar(255) not null, sop_iuid varchar(255) not null, pps_status integer not null, study_iuid varchar(255) not null, updated_time timestamp not null, version numeric(18,0), dicomattrs_fk numeric(18,0) not null, discreason_code_fk numeric(18,0), patient_fk numeric(18,0) not null, primary key (pk));
create table mwl_item (pk numeric(18,0) not null, accession_no varchar(16) not null, accno_entity_id varchar(64), accno_entity_uid varchar(64), accno_entity_uid_type varchar(64), admission_id varchar(64) not null, admid_entity_id varchar(64), admid_entity_uid varchar(64), admid_entity_uid_type varchar(16), created_time timestamp not null, institution varchar(64) not null, department varchar(64) not null, local_aet varchar(16) not null, modality varchar(16) not null, req_proc_id varchar(16) not null, sps_id varchar(16) not null, sps_start_date varchar(16) not null, sps_start_time varchar(16) not null, sps_status integer not null, study_iuid varchar(64) not null, updated_time timestamp not null, version numeric(18,0), dicomattrs_fk numeric(18,0) not null, inst_code_fk numeric(18,0), dept_code_fk numeric(18,0), patient_fk numeric(18,0) not null, perf_phys_name_fk numeric(18,0), primary key (pk));
create table mwl_item (pk numeric(18,0) not null, accession_no varchar(16) not null, accno_entity_id varchar(64), accno_entity_uid varchar(64), accno_entity_uid_type varchar(64), admission_id varchar(64) not null, admid_entity_id varchar(64), admid_entity_uid varchar(64), admid_entity_uid_type varchar(16), created_time timestamp not null, institution varchar(64) not null, department varchar(64) not null, modality varchar(16) not null, req_proc_id varchar(16) not null, sps_id varchar(16) not null, sps_start_date varchar(16) not null, sps_start_time varchar(16) not null, sps_status integer not null, study_iuid varchar(64) not null, updated_time timestamp not null, version numeric(18,0), worklist_label varchar(64) not null, dicomattrs_fk numeric(18,0) not null, inst_code_fk numeric(18,0), dept_code_fk numeric(18,0), patient_fk numeric(18,0) not null, perf_phys_name_fk numeric(18,0), primary key (pk));
create table patient (pk numeric(18,0) not null, created_time timestamp not null, failed_verifications integer not null, num_studies integer not null, pat_birthdate varchar(255) not null, pat_custom1 varchar(255) not null, pat_custom2 varchar(255) not null, pat_custom3 varchar(255) not null, pat_sex varchar(255) not null, updated_time timestamp not null, verification_status integer not null, verification_time timestamp, version numeric(18,0), dicomattrs_fk numeric(18,0) not null, merge_fk numeric(18,0), patient_id_fk numeric(18,0), pat_name_fk numeric(18,0), resp_person_fk numeric(18,0), primary key (pk));
create table patient_demographics (pat_id varchar(255) not null, pat_birthdate varchar(255), pat_name varchar(255), pat_sex varchar(255), primary key (pat_id));
create table patient_id (pk numeric(18,0) not null, pat_id varchar(64) not null, pat_id_type_code varchar(64), entity_id varchar(64), entity_uid varchar(64), entity_uid_type varchar(64), version numeric(18,0), primary key (pk));
Expand Down Expand Up @@ -73,7 +73,7 @@ alter table mpps add constraint UK_cyqglxijg7kebbj6oj821yx4d unique (sop_iuid);
alter table mwl_item add constraint UK_6qj8tkh6ib9w2pjqwvqe23ko unique (dicomattrs_fk);
alter table mwl_item add constraint UK_lerlqlaghhcs0oaj5irux4qig unique (study_iuid, sps_id);
create index UK_d0v5hjn1crha2nqbws4wj0yoj on mwl_item (updated_time);
create index UK_9ockpkbetj7a97for0s1jhasi on mwl_item (local_aet);
create index UK_88bqeff7thxsmgcmtrg5l3td on mwl_item (worklist_label);
create index UK_2odo3oah39o400thy9bf0rgv0 on mwl_item (sps_id);
create index UK_kedi0qimmvs83af3jxk471uxn on mwl_item (req_proc_id);
create index UK_fpfq8q514gsime2dl8oo773d4 on mwl_item (study_iuid);
Expand Down
4 changes: 2 additions & 2 deletions dcm4chee-arc-entity/src/main/resources/sql/h2/create-h2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ create table key_value2 (pk bigint generated by default as identity, content_typ
create table location (pk bigint generated by default as identity, created_time timestamp not null, digest varchar(255), multi_ref integer, object_type integer not null, object_size bigint not null, status integer not null, storage_id varchar(255) not null, storage_path varchar(255) not null, tsuid varchar(255), uidmap_fk bigint, instance_fk bigint, primary key (pk));
create table metadata (pk bigint generated by default as identity, created_time timestamp not null, digest varchar(255), object_size bigint not null, status integer not null, storage_id varchar(255) not null, storage_path varchar(255) not null, primary key (pk));
create table mpps (pk bigint generated by default as identity, accession_no varchar(255) not null, accno_entity_id varchar(255), accno_entity_uid varchar(255), accno_entity_uid_type varchar(255), created_time timestamp not null, pps_start_date varchar(255) not null, pps_start_time varchar(255) not null, sop_iuid varchar(255) not null, pps_status integer not null, study_iuid varchar(255) not null, updated_time timestamp not null, version bigint, dicomattrs_fk bigint not null, discreason_code_fk bigint, patient_fk bigint not null, primary key (pk));
create table mwl_item (pk bigint generated by default as identity, accession_no varchar(255) not null, accno_entity_id varchar(255), accno_entity_uid varchar(255), accno_entity_uid_type varchar(255), admission_id varchar(255) not null, admid_entity_id varchar(255), admid_entity_uid varchar(255), admid_entity_uid_type varchar(255), created_time timestamp not null, institution varchar(255) not null, department varchar(255) not null, local_aet varchar(255) not null, modality varchar(255) not null, req_proc_id varchar(255) not null, sps_id varchar(255) not null, sps_start_date varchar(255) not null, sps_start_time varchar(255) not null, sps_status integer not null, study_iuid varchar(255) not null, updated_time timestamp not null, version bigint, dicomattrs_fk bigint not null, inst_code_fk bigint, dept_code_fk bigint, patient_fk bigint not null, perf_phys_name_fk bigint, primary key (pk));
create table mwl_item (pk bigint generated by default as identity, accession_no varchar(255) not null, accno_entity_id varchar(255), accno_entity_uid varchar(255), accno_entity_uid_type varchar(255), admission_id varchar(255) not null, admid_entity_id varchar(255), admid_entity_uid varchar(255), admid_entity_uid_type varchar(255), created_time timestamp not null, institution varchar(255) not null, department varchar(255) not null, modality varchar(255) not null, req_proc_id varchar(255) not null, sps_id varchar(255) not null, sps_start_date varchar(255) not null, sps_start_time varchar(255) not null, sps_status integer not null, study_iuid varchar(255) not null, updated_time timestamp not null, version bigint, worklist_label varchar(255) not null, dicomattrs_fk bigint not null, inst_code_fk bigint, dept_code_fk bigint, patient_fk bigint not null, perf_phys_name_fk bigint, primary key (pk));
create table patient (pk bigint generated by default as identity, created_time timestamp not null, failed_verifications integer not null, num_studies integer not null, pat_birthdate varchar(255) not null, pat_custom1 varchar(255) not null, pat_custom2 varchar(255) not null, pat_custom3 varchar(255) not null, pat_sex varchar(255) not null, updated_time timestamp not null, verification_status integer not null, verification_time timestamp, version bigint, dicomattrs_fk bigint not null, merge_fk bigint, patient_id_fk bigint, pat_name_fk bigint, resp_person_fk bigint, primary key (pk));
create table patient_demographics (pat_id varchar(255) not null, pat_birthdate varchar(255), pat_name varchar(255), pat_sex varchar(255), primary key (pat_id));
create table patient_id (pk bigint generated by default as identity, pat_id varchar(255) not null, pat_id_type_code varchar(255), entity_id varchar(255), entity_uid varchar(255), entity_uid_type varchar(255), version bigint, primary key (pk));
Expand Down Expand Up @@ -73,7 +73,7 @@ alter table mpps add constraint UK_cyqglxijg7kebbj6oj821yx4d unique (sop_iuid);
alter table mwl_item add constraint UK_6qj8tkh6ib9w2pjqwvqe23ko unique (dicomattrs_fk);
alter table mwl_item add constraint UK_lerlqlaghhcs0oaj5irux4qig unique (study_iuid, sps_id);
create index UK_d0v5hjn1crha2nqbws4wj0yoj on mwl_item (updated_time);
create index UK_9ockpkbetj7a97for0s1jhasi on mwl_item (local_aet);
create index UK_88bqeff7thxsmgcmtrg5l3td on mwl_item (worklist_label);
create index UK_2odo3oah39o400thy9bf0rgv0 on mwl_item (sps_id);
create index UK_kedi0qimmvs83af3jxk471uxn on mwl_item (req_proc_id);
create index UK_fpfq8q514gsime2dl8oo773d4 on mwl_item (study_iuid);
Expand Down
Loading

0 comments on commit 3c396e5

Please sign in to comment.