From 0c7df661f96b6221653390990db47c5ec2a003a3 Mon Sep 17 00:00:00 2001 From: chenqi Date: Thu, 18 Jun 2026 20:03:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DV59=E8=BF=81=E7=A7=BB+?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E8=A1=A8=E5=AE=9A=E4=B9=89+=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._clinical_pathway_variance_delete_flag.sql | 6 +++- .../V83__fix_duplicate_table_schemas.sql | 32 +++++++++++++++++++ .../components/eprescriptiondialog.vue | 4 +-- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V59__fix_clinical_pathway_variance_delete_flag.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V59__fix_clinical_pathway_variance_delete_flag.sql index 52432ae42..88283ddae 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V59__fix_clinical_pathway_variance_delete_flag.sql +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V59__fix_clinical_pathway_variance_delete_flag.sql @@ -1,2 +1,6 @@ -ALTER TABLE clinical_pathway_variance RENAME COLUMN del_flag TO delete_flag; +DO $$ BEGIN + ALTER TABLE clinical_pathway_variance RENAME COLUMN del_flag TO delete_flag; +EXCEPTION WHEN undefined_column THEN + RAISE NOTICE 'column del_flag does not exist, skipping rename'; +END $$; ALTER TABLE clinical_pathway_variance ALTER COLUMN tenant_id SET DATA TYPE BIGINT; diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql new file mode 100644 index 000000000..f893232f3 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql @@ -0,0 +1,32 @@ +DO $$ BEGIN + ALTER TABLE emr_quality_score ADD COLUMN total_score DECIMAL(5,2); + ALTER TABLE emr_quality_score ADD COLUMN completeness_score DECIMAL(5,2); + ALTER TABLE emr_quality_score ADD COLUMN timeliness_score DECIMAL(5,2); + ALTER TABLE emr_quality_score ADD COLUMN accuracy_score DECIMAL(5,2); +EXCEPTION WHEN duplicate_column THEN + RAISE NOTICE 'emr_quality_score columns already exist'; +END $$; + +DO $$ BEGIN + ALTER TABLE emr_quality_score ALTER COLUMN tenant_id TYPE BIGINT USING tenant_id::BIGINT; +EXCEPTION WHEN undefined_column THEN + RAISE NOTICE 'emr_quality_score.tenant_id does not exist'; +END $$; + +DO $$ BEGIN + ALTER TABLE sys_esb_message ADD COLUMN delete_flag CHAR(1) DEFAULT '0'; +EXCEPTION WHEN duplicate_column THEN + RAISE NOTICE 'sys_esb_message.delete_flag already exists'; +END $$; + +DO $$ BEGIN + ALTER TABLE sys_esb_service_registry ADD COLUMN delete_flag CHAR(1) DEFAULT '0'; +EXCEPTION WHEN duplicate_column THEN + RAISE NOTICE 'sys_esb_service_registry.delete_flag already exists'; +END $$; + +DO $$ BEGIN + ALTER TABLE sys_esb_service_registry ADD COLUMN tenant_id INTEGER DEFAULT 0; +EXCEPTION WHEN duplicate_column THEN + RAISE NOTICE 'sys_esb_service_registry.tenant_id already exists'; +END $$; diff --git a/healthlink-his-ui/src/views/doctorstation/components/eprescriptiondialog.vue b/healthlink-his-ui/src/views/doctorstation/components/eprescriptiondialog.vue index f13f0469c..2a4646a0a 100755 --- a/healthlink-his-ui/src/views/doctorstation/components/eprescriptiondialog.vue +++ b/healthlink-his-ui/src/views/doctorstation/components/eprescriptiondialog.vue @@ -1,4 +1,4 @@ -