2 Комити 09b57c5394 ... f0c169fe42

Аутор SHA1 Порука Датум
  shao f0c169fe42 patient_type пре 1 недеља
  shao 40568c68e2 patient_type пре 1 недеља

+ 1 - 0
cmd/server/server.go

@@ -78,6 +78,7 @@ func run() error {
 	s := grpc.NewServer()
 	grpc_health_v1.RegisterHealthServer(s, health.NewServer())
 	pb.RegisterBasicServer(s, &service.BasicServer{})
+	pb.RegisterProtocolServer(s, &service.ProtocolServer{})
 
 	slog.Info("module: " + common.Module)
 	slog.Info("desc: " + common.Desc)

+ 14 - 14
common/enum.go

@@ -34,22 +34,22 @@ func AllLanguages() []Lang {
 type Source string
 
 const (
-	SOURCE_GUI     Source = "gui"
-	SOURCE_BROWSER Source = "browser"
-	SOURCE_ANDROID Source = "android"
-	SOURCE_DEV     Source = "dev"
+	SOURCE_ELECTRON Source = "ELectron"
+	SOURCE_BROWSER  Source = "Browser"
+	SOURCE_ANDROID  Source = "Android"
+	SOURCE_DEV      Source = "Dev"
 )
 
 func (p Source) ToString() string {
 	switch p {
-	case SOURCE_GUI:
-		return "gui"
+	case SOURCE_ELECTRON:
+		return "ELectron"
 	case SOURCE_BROWSER:
-		return "browser"
+		return "Browser"
 	case SOURCE_ANDROID:
-		return "android"
+		return "Android"
 	case SOURCE_DEV:
-		return "dev"
+		return "Dev"
 	default:
 		return ""
 	}
@@ -65,22 +65,22 @@ func ValidSources(sources []Source) bool {
 }
 
 func AllSources() []Source {
-	return []Source{SOURCE_GUI, SOURCE_BROWSER, SOURCE_ANDROID, SOURCE_DEV}
+	return []Source{SOURCE_ELECTRON, SOURCE_BROWSER, SOURCE_ANDROID, SOURCE_DEV}
 }
 
 type Product string
 
 const (
-	PRODUCT_DROC Product = "droc"
-	PRODUCT_VET  Product = "vetdroc"
+	PRODUCT_DROC Product = "DROC"
+	PRODUCT_VET  Product = "VETDROC"
 )
 
 func (p Product) ToString() string {
 	switch p {
 	case PRODUCT_DROC:
-		return "droc"
+		return "DROC"
 	case PRODUCT_VET:
-		return "vetdroc"
+		return "VETDROC"
 	default:
 		return ""
 	}

+ 14 - 0
common/utils.go

@@ -1,13 +1,19 @@
 package common
 
 import (
+	"context"
 	"crypto/aes"
 	"crypto/cipher"
 	"crypto/md5"
 	"encoding/hex"
+	"log/slog"
 	"time"
 )
 
+import (
+	md "google.golang.org/grpc/metadata"
+)
+
 var CstSh, _ = time.LoadLocation("Asia/Shanghai")
 
 const (
@@ -35,6 +41,14 @@ func MD5(v []byte) string {
 	return hex.EncodeToString(re)
 }
 
+func GetHeader(ctx context.Context) (Product, Source, Lang) {
+	m, ok := md.FromIncomingContext(ctx)
+	if ok {
+		slog.Debug("metadata.FromIncomingContext", "md", m)
+	}
+	return Product(m.Get("product")[0]), Source(m.Get("source")[0]), Lang(m.Get("language")[0])
+}
+
 var dbPwKey = []byte("X3O6wVF&6*&lSVk0*504V~q7>\"k]6S'*") // 32 bytes for AES-256
 var dbPwNonceHex = "1962a6f6f9999447632c8a34"
 

+ 5 - 4
config/config.toml.template

@@ -7,6 +7,7 @@ auth = "0.0.0.0:6001"
 resource = "localhost:6102"
 study = "localhost:6103"
 protocol = "localhost:6104"
+dcmtk = "localhost:6199"
 
 [logger]
 logDir = "./logs/" # 日志存储目录
@@ -37,7 +38,7 @@ locales = [
 ]
 # 支持的语言,可选项:"en","zh"
 languages = ["en", "zh"]
-# 支持的产品,可选项:"droc","vetdroc"
-product = "vetdroc"
-# 支持的访问源,可选项:"gui","browser","android"
-sources = ["gui", "browser", "android"]
+# 支持的产品,可选项:"DROC","VETDROC"
+product = "DROC"
+# 支持的访问源,可选项:"Electron","Browser","Android"
+sources = ["ELectron", "Browser", "Android"]

+ 53 - 0
models/initdata.go

@@ -0,0 +1,53 @@
+package models
+
+import (
+	"bufio"
+	"fmt"
+	"io/fs"
+	"log/slog"
+	"strings"
+)
+
+import (
+	"gorm.io/gorm"
+)
+
+import (
+	"protocol-server/static"
+)
+
+func initTable(sqlFilePath string) error {
+	slog.Info("initTable ...", "file", sqlFilePath)
+	file, err := static.GetSqlFile(sqlFilePath)
+	if err != nil {
+		return fmt.Errorf("error opening SQL file: %w", err)
+	}
+	defer func(file fs.File) {
+		err := file.Close()
+		if err != nil {
+			slog.Error("error closing SQL file:", err)
+		}
+	}(file)
+
+	scanner := bufio.NewScanner(file)
+	err = DB.Transaction(func(tx *gorm.DB) error {
+		for scanner.Scan() {
+			line := strings.TrimSpace(scanner.Text())
+			result := tx.Exec(line)
+			if result.Error != nil {
+				return fmt.Errorf("error executing INSERT statement: %s\tError: %w", line, result.Error)
+			}
+		}
+
+		if err := scanner.Err(); err != nil {
+			return fmt.Errorf("error reading SQL file: %w", err)
+		}
+		return nil
+	})
+	if err != nil {
+		return err
+	}
+
+	slog.Info("Processed SQL file: %s.\n", sqlFilePath)
+	return nil
+}

+ 56 - 1
models/model.go

@@ -4,9 +4,64 @@ import (
 	"gorm.io/gorm"
 )
 
+type PatientType struct {
+	gorm.Model
+	PatientTypeID          string
+	PatientTypeName        string
+	PatientTypeLocal       string
+	PatientTypeDescription string
+	Sort                   int32
+	IsEnabled              bool
+	Product                string
+	IsPreInstall           bool
+}
+
+func (PatientType) TableName() string {
+	return "p_patient_type"
+}
+
+type BodyPart struct {
+	gorm.Model
+	BodyPartID          string
+	BodyPartName        string
+	BodyPartLocal       string
+	BodyPartDescription string
+	PatientType         string
+	Category            string
+	Sort                int32
+	IsEnabled           bool
+	Product             string
+	IsPreInstall        bool
+}
+
+func (BodyPart) TableName() string {
+	return "p_body_part"
+}
+
 type Procedure struct {
 	gorm.Model
-	ProcedureID string
+	ProcedureID               string  `gorm:"uniqueIndex"`
+	ProcedureCode             string  //程序代码
+	ProcedureName             string  //程序名称
+	ProcedureOtherName        string  //程序别名
+	ProcedureDescription      string  //程序描述
+	ProtocolCode              string  //协议代码
+	PatientType               string  //病人类型
+	ProcedureGroupID          string  //程序组ID
+	ProcedureGroupDescription string  //程序组描述
+	ProcedureType             string  //程序类型
+	FastSearch                bool    //是否快速搜索
+	ProtocolLaterality        string  //协议体位
+	PrintStyleID              string  //打印样式ID
+	ProcedureCategory         string  //程序类别
+	Modality                  string  //设备类型
+	ConfigObjectValue         string  //配置对象值
+	MagFactor                 float32 //放大倍数
+	ClinicProtocol            bool    //是否临床协议
+	Sort                      int32
+	IsEnabled                 bool
+	Product                   string
+	IsPreInstall              bool
 }
 
 func (Procedure) TableName() string {

+ 11 - 0
models/scope.go

@@ -32,3 +32,14 @@ func Query(query string, args ...interface{}) func(db *gorm.DB) *gorm.DB {
 		return db
 	}
 }
+
+func String(query string, arg string) func(db *gorm.DB) *gorm.DB {
+	if len(arg) > 0 {
+		return func(db *gorm.DB) *gorm.DB {
+			return db.Where(query, arg)
+		}
+	}
+	return func(db *gorm.DB) *gorm.DB {
+		return db
+	}
+}

+ 11 - 0
models/setup.go

@@ -27,6 +27,17 @@ func panicHelper(err error) {
 }
 
 func migrate() {
+	panicHelper(DB.AutoMigrate(&PatientType{}))
+	var count int64
+	DB.Model(&BodyPart{}).Count(&count)
+	if count == 0 {
+		panicHelper(initTable("p_patient_type_202505291630.sql"))
+	}
+	panicHelper(DB.AutoMigrate(&BodyPart{}))
+	DB.Model(&BodyPart{}).Count(&count)
+	if count == 0 {
+		panicHelper(initTable("p_body_part_202505291606.sql"))
+	}
 	panicHelper(DB.AutoMigrate(&Procedure{}))
 }
 

+ 1 - 1
rpc_idl

@@ -1 +1 @@
-Subproject commit 41e78dbf6c013fa7c6d92119c4ced7b1fd6ca535
+Subproject commit fd1299aaac1e201fdd1a946f14143d93f04e4c14

+ 32 - 0
service/protocol.go

@@ -0,0 +1,32 @@
+package service
+
+import (
+	"context"
+	"google.golang.org/grpc/codes"
+	"google.golang.org/grpc/status"
+	"protocol-server/common"
+	"protocol-server/models"
+)
+
+import (
+	pb "protocol-server/rpc_idl/dr_protocol_pb"
+)
+
+type ProtocolServer struct {
+	pb.UnimplementedProtocolServer
+}
+
+func (s *ProtocolServer) GetPatientType(ctx context.Context, in *pb.PatientTypeRequest) (*pb.PatientTypeReply, error) {
+	product, _, _ := common.GetHeader(ctx)
+	res := pb.PatientTypeReply{}
+	err := models.DB.Model(&models.PatientType{}).Scopes(
+		models.String("product = ?", product.ToString()),
+	).Order("sort").Find(&res.PatientTypeList).Error
+	if err != nil {
+		return nil, status.Errorf(codes.Internal, "patient_type find err %v", err)
+	}
+	return &res, nil
+}
+func (s *ProtocolServer) GetBodyPart(ctx context.Context, in *pb.BodyPartRequest) (*pb.BodyPartReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetBodyPart not implemented")
+}

+ 30 - 0
static/basic.go

@@ -0,0 +1,30 @@
+package static
+
+import (
+	"embed"
+	"errors"
+	"io/fs"
+)
+
+//go:embed sqls
+var sqlFiles embed.FS
+
+func GetSqlFile(filename string) (fs.File, error) {
+	localeEntries, err := sqlFiles.ReadDir("sqls")
+	if err != nil {
+		return nil, err
+	}
+	for _, le := range localeEntries {
+		if le.IsDir() {
+		} else {
+			if le.Name() == filename {
+				f, err := sqlFiles.Open("sqls/" + le.Name())
+				if err != nil {
+					return nil, err
+				}
+				return f, nil
+			}
+		}
+	}
+	return nil, errors.New("sql file not exist, " + filename)
+}

+ 48 - 0
static/sqls/p_body_part_202505291606.sql

@@ -0,0 +1,48 @@
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_SKULL','颅骨',NULL,'Skull','Human','DX',1,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_NECK','颈部',NULL,'Neck','Human','DX',2,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_SHOULDER','肩关节',NULL,'Shoulder','Human','DX',3,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_SPINE','脊柱',NULL,'Spine','Human','DX',4,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_THORAX','胸部',NULL,'Thorax','Human','DX',5,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_ABDOMEN','腹部',NULL,'Abdomen','Human','DX',6,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_PELVIS','骨盆',NULL,'Pelvis','Human','DX',7,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_UPPER LIMB','上肢',NULL,'UpperLimb','Human','DX',8,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_HAND','手部',NULL,'Hand','Human','DX',9,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_LOWER LIMB','下肢',NULL,'LowerLimb','Human','DX',10,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_FOOT','足部',NULL,'Foot','Human','DX',11,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_TOMO','TOMO',NULL,'TOMO','Human','DX',12,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_DUAL ENERGY','双能',NULL,'Human_DUAL ENERGY','Human','DX',13,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Human_QC','QC',NULL,'QC','Human','DX',14,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Calibration','校准',NULL,'Calibration','SpecialType','DX',15,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('IQAP','IQAP',NULL,'IQAP','SpecialType','DX',16,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('ThicknessRange','厚度范围',NULL,'ThicknessRange','SpecialType','DX',17,true,'DROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Cat_Skull','猫 头骨',NULL,'Skull','Cat','DX',1,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Cat_Spine','猫 脊椎',NULL,'Spine','Cat','DX',2,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Cat_Thorax','猫 胸部',NULL,'Thorax','Cat','DX',3,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Cat_FrontExtremities','猫 前肢',NULL,'Forelimb','Cat','DX',4,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Cat_Abdomen','猫 腹部',NULL,'Abdomen','Cat','DX',5,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Cat_Hip','猫 臀部',NULL,'Hip','Cat','DX',6,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Cat_RearExtremities','猫 后肢',NULL,'Hindlimb','Cat','DX',7,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Dog_Skull','狗 头骨',NULL,'Skull','Dog','DX',8,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Dog_Spine','狗 脊椎',NULL,'Spine','Dog','DX',9,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Dog_Thorax','狗 胸部',NULL,'Thorax','Dog','DX',10,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Dog_FrontExtremities','狗 前肢',NULL,'Forelimb','Dog','DX',11,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Dog_Abdomen','狗 腹部',NULL,'Abdomen','Dog','DX',12,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Dog_Hip','狗 臀部',NULL,'Hip','Dog','DX',13,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Dog_RearExtremities','狗 后肢',NULL,'Hindlimb','Dog','DX',14,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Equine_Head','马 头',NULL,'Head','Equine','DX',15,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Equine_Spine','马 脊椎',NULL,'Spine','Equine','DX',16,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Equine_THORAX','马 胸腔',NULL,'Thorax & Abdomen','Equine','DX',17,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Equine_Left_Forelimb','马 左前肢',NULL,'Left Forelimb','Equine','DX',18,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Equine_Right_Forelimb','马 右前肢',NULL,'Right Forelimb','Equine','DX',19,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Equine_Left_Hindlimb','马 左后肢',NULL,'Left Hindlimb','Equine','DX',20,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Equine_Right_Hindlimb','马 右后肢',NULL,'Right Hindlimb','Equine','DX',21,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Exotic_Birds','啮齿类 鸟',NULL,'Avian Species','Birds','DX',22,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Exotic_Fish','啮齿类 鱼',NULL,'Fish Species','Fish','DX',23,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Exotic_Gnawer','啮齿类 鼠类',NULL,'Rat & Hamster','Gnawer','DX',24,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Exotic_Lizard','啮齿类 蜥蜴',NULL,'Lizard Species','Lizard','DX',25,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Exotic_Rabbit','啮齿类 兔子',NULL,'Rabbit Species','Rabbit','DX',26,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Exotic_Snake','啮齿类 蛇',NULL,'Snake Species','Snake','DX',27,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Exotic_Turtle','啮齿类 龟',NULL,'Chelonian Species','Turtle','DX',28,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('Calibration','校准',NULL,'Calibration','Other','DX',29,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('ThicknessRange','厚度范围',NULL,'ThicknessRange','Other','DX',30,true,'VETDROC',true);
+INSERT INTO public.p_body_part (body_part_id,body_part_name,body_part_local,body_part_description,patient_type,category,sort,is_enabled,product,is_pre_install) VALUES ('QC','QC',NULL,'QC','Other','DX',31,true,'VETDROC',true);

+ 13 - 0
static/sqls/p_patient_type_202505291630.sql

@@ -0,0 +1,13 @@
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Human','Human','','Human',1,true,'DROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('SpecialType','SpecialType','','SpecialType',2,true,'DROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Cat','Cat','','Cat',1,true,'VETDROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Dog','Dog','','Dog',2,true,'VETDROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Equine','Equine','','Equine',3,true,'VETDROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Birds','Birds','','Birds',4,true,'VETDROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Fish','Fish','','Fish',5,false,'VETDROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Lizard','Lizard','','Lizard',6,true,'VETDROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Rabbit','Rabbit','','Rabbit',7,true,'VETDROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Snake','Snake','','Snake',8,true,'VETDROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Turtle','Turtle','','Turtle',9,true,'VETDROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Gnawer','Gnawer','','Gnawer',10,true,'VETDROC',true);
+INSERT INTO public.p_patient_type (patient_type_id,patient_type_name,patient_type_local,patient_type_description,sort,is_enabled,product,is_pre_install) VALUES ('Other','Other','','Other',11,false,'VETDROC',true);