2025-08-25.md 6.7 KB

新增pdf的电子病历

alter table emr_patient_data
    add pdf_url nvarchar(100)
go

exec sp_addextendedproperty 'MS_Description', N'是不是pdf', 'SCHEMA', 'dbo', 'TABLE', 'emr_patient_data', 'COLUMN',
     'pdf_url'
go

执行下面sql语句

drop table emr_folder;
create table emr_folder
(
    id          varchar(32)                    not null
        constraint emr_folder_pk
            primary key,
    name        varchar(500),
    parent      varchar(32),
    sort        int          default 1,
    folder_name varchar(32),
    del_flag    bit          default 0,
    create_time datetime2(6) default getdate() not null,
    create_code varchar(32),
    update_time datetime2(6),
    update_code varchar(32)
)
go

create index emr_folder_folder_name_index
    on emr_folder (folder_name)
go

INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'15db157054fa11eda5682b9e7526e088', N'死亡讨论记录', null, 10, N'HOSPITAL', 0, N'2024-08-15 10:45:09.357000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'1de0fa50826311eda069a96f837d6f0e', N'妇产相关', null, 17, N'HOSPITAL', 0, N'2024-08-15 10:45:09.362000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'281710a054fe11edb28ac955a5f5cad1', N'手术相关', null, 6, N'HOSPITAL', 0, N'2024-08-15 10:45:09.355000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'2e1e133054ff11edb28ac955a5f5cad1', N'告知书、知情同意书', null, 12, N'HOSPITAL', 0,
        N'2024-08-15 10:45:09.357000', N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'2edd656063c211ed80cf337e2ea52a8c', N'输血相关', null, 14, N'HOSPITAL', 0, N'2024-08-15 10:45:09.360000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'33e98780df2511edae41778ce2254332', N'其他', null, 19, N'HOSPITAL', 0, N'2024-08-15 10:45:09.364000', N'99999',
        null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'4145fb70ee1611ed9b87cfd972c2d32e', N'新生儿', null, 16, N'HOSPITAL', 0, N'2024-08-15 10:45:09.362000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'4959e2c054fd11edb28ac955a5f5cad1', N'入院记录、接收记录、再入院记录', null, 3, N'HOSPITAL', 0,
        N'2024-08-15 10:45:09.353000', N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'58a5e6c054fd11edb28ac955a5f5cad1', N'病程记录', null, 4, N'HOSPITAL', 0, N'2024-08-15 10:45:09.354000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'6d675cd0648211ed809cdb426e4ec9c2', N'造影报告单', null, 15, N'HOSPITAL', 0, N'2024-08-15 10:45:09.361000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'73d696605e4911edbb0eab416e27b81a', N'入院签字包', null, 2, N'HOSPITAL', 0, N'2024-08-15 10:45:09.000000',
        N'99999', N'2024-08-29 16:40:58.000000', N'admin');
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'751d9f105e7a11eda87b311ed1e70710', N'出院签字包', null, 8, N'HOSPITAL', 0, N'2024-08-15 10:45:09.356000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'8bf179b0dcf511ed9454c5500afc9d2f', N'各类评分表', null, 18, N'HOSPITAL', 0, N'2024-08-15 10:45:09.363000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'a2c164f0b4ce11ee9eb2330ccb3135ac', N'临床路径', null, 11, N'HOSPITAL', 0, N'2024-08-15 10:45:09.357000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'e4ea94c877d04f40a2ddd195eec1d1f0', N'住院证', null, 1, N'HOSPITAL', 0, N'2025-08-26 14:09:09.610000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'eb75a8e054f911eda5682b9e7526e088', N'出院记录或死亡记录', null, 7, N'HOSPITAL', 0,
        N'2024-08-15 10:45:09.355000', N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'f61dae0054fe11edb28ac955a5f5cad1', N'疑难、全院大会诊、MDT讨论记录', null, 5, N'HOSPITAL', 0,
        N'2024-08-15 10:45:09.354000', N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'fb4c44f057ff11eda93f1fd7ab32baa6', N'检查结果粘贴单', null, 13, N'HOSPITAL', 0, N'2024-08-15 10:45:09.359000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'fb4c44f057ff11eda93f1fd7ab32baa7', N'门诊病历', null, 1, N'OUT_HOSPITAL', 0, N'2025-07-08 08:20:16.283000',
        N'99999', null, null);
INSERT INTO emr_folder (id, name, parent, sort, folder_name, del_flag, create_time, create_code, update_time,
                        update_code)
VALUES (N'fb4c44f057ff11eda93f1fd7ab32baa8', N'急诊病历', null, 2, N'OUT_HOSPITAL', 0, N'2025-07-08 08:21:08.983000',
        N'99999', null, null);