--术语更新表（Term）
    create table TermUpdate
	(
	ID		serial PRIMARY KEY ,			/*序号*/					
	PID 		int ,				   	/*检查记录项目代码*/
	SID		int,					/*该检查记录项目名称*/
	Name		varchar(400),				/*名称*/
	Score		int,					/*分数*/
	Seq		int,					/*显示次序*/
	Oldname		varchar(400),				/*原名称*/
	Optype		int					/*操作类型0删除1添加2修改*/
	);
begin transaction;
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(3,NULL,0,'Preliminary Diagnosis Result',NULL,3,'Primary Diagnosis Result',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(13,1,0,'Pathological Findings',NULL,3,'Pathology Result',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1101,11,1,'Vulvar Pruritus',NULL,1,'Vulva Pruritus',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1102,11,1,'Vaginal Pruritus',NULL,2,'Vagina Pruritus',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1103,11,1,'Vulvar Burning',NULL,3,'Vulva Burning',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1104,11,1,'Vaginal Burning',NULL,4,'Vagina Burning',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1105,11,1,'Vulvar Ulceration',NULL,5,'Ulceration of Vulva',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1106,11,1,'Vulvar Neoplasm',NULL,6,'Neoplasms of Vulva',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1107,11,1,'Vulvar Erythroplasia',NULL,7,'Erythroplasia of Vulva',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1314,13,1,'Endometrial Polyps',NULL,14,'Endometrial',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1404,14,0,'Unsatisfactory Colposcopic Finding',NULL,4,'Unsatisfactory Colposcopy',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(140102,1401,1,'Original Squamous Epithelium',NULL,2,'Original Squamous Epithetlium',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(140103,1401,1,'Columnar Epithelium',NULL,3,'Columnar Epithetlium',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(140201,1402,1,'Flat Acetowhite Epithelium',NULL,1,'Flat Acetowhite Epithetlium',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(140205,1402,1,'Iodine Partially Positive',NULL,5,'Iodine Partial Positivity',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(140206,1402,1,'Iodine Negative',NULL,6,'Iodine Negativity',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(140302,1403,1,'Irregular Surface, Cervical Erosion or Ulceration',NULL,2,'Irregular Surface, Cervical Erosion or Ulcerate',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(140303,1403,1,'Dense Acetowhite Epithelium',NULL,3,'Dense Acetowhite Epithetlium',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(140304,1403,1,'Randomly-and-widely-placed Punctation and Mosaic',NULL,4,'Interrupted Punctation and Mosaic',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1513,15,1,'Regular Check ',NULL,13,'Check Regulary ',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1601,16,1,'Remove vaginal gauze by youself 8 hours later. See a doctor immediately if massive vaginal bleeding occurs',NULL,1,'8 hours later to remove vaginal gauze by youself . See a doctor immediately if massive vaginal bleeding occurs',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1602,16,1,'Bring the case history book to fetch the examination report a week later',NULL,2,'Bring the case hostory book to fetch the examination report in this department a week later',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1705,17,1,'PCR Negative',NULL,5,'PCR Negativity',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(1706,17,1,'PCR Positive',NULL,6,'PCR Positivity',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2101,21,1,'Low-intensity acetowhitening (not completely opaque); indistinct acetowhitening; transparent or translucent acetowhitenning.  Acetowhitening beyond the margin of the transformation zone. Pure snow-white color with intense surface shine (rare).',0,1,'Low-intensity acetowhitening epithetlium; Snow-white, shiny; Blurry, transparent; Acetowhitening beyond the margin of the transformation zone.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2102,21,1,'Intermediate shade-grey/white color and shiny surface (most lesions should be scored in this category).',1,2,'Acetowhitening epithetlium with grey/white colour and shiny surface.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2103,21,1,'Dull, opaque, oyster white; grey.',2,3,'Dull, opaque, oyster white; Grey.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2201,22,1,'Microcondylomatous or micropapillary contour. Flat lesions with indistinct margins. Feathered or finely scalloped margins. Angular, jagged lesions. Satellite lesions beyond the margin of the transformation zone.',0,1,'Feathered margins, angular, jagged lesions; Flat lesions with indistinct margins; Microcondylomatous or micropapillary surface contour.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2203,22,1,'Rolled, peeling edges internal demarcations between areas of differing colposcopic appearance--a central area of high-grade change and peripheral area of low-grade change.',2,3,'Rolled, peeling edges; Internal demarcations between areas of differing colposcopic appearance-a central area of high-grade change and peripheral area of low-grade change.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2301,23,1,'Fine/uniform-calibre vessels-closely and uniformly placed. Poorly formed patterns of fine punctation and/or mosaic. Vessels beyond the margin of the transformation zone. Fine vessels within microcondylomatous or micropapillary lesions.',0,1,'Fine/uniform-calibre vessels; Poorly formed patterns of fine punctation; mosaic.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2302,23,1,'Absent vessels',1,2,'Absent vessels.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2303,23,1,'Well defined coarse punctation or mosaic, sharply demarcated - and randomly and widely placed.',2,3,'Well defined coarse punctation or mosaic.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2401,24,1,'Positive iodine uptake, giving mahogany-brown color.Negative uptake of insignificant lesion, i.e. yellow staining by a lesion scoring three points or less on the first three criteria. Areas beyond the margin of the transformation zone,conspicuous on colposcopy,evident as iodine-negative areas (such areas are frequently due to parakeratosis).',0,1,'Positive iodine uptake giving mahogany-brown color; Negative uptake of insignificant lesion scoring three points or less on the first three criteria.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2402,24,1,'Partial iodine uptake-variegated, speckled appearance.',1,2,'Scoring four points or more on the first three criteria, partial iodine uptake - variegated, speckled appearance.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(2403,24,1,'Negative iodine uptake of significant lesion, i.e., yellow staining by a lesion already scoring four points or more on the frist three criteria.',2,3,'Negative iodine uptake of significant lesion scoring four points or more on the first three criteria.',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(3012,3,1,'Invasive Carcinoma',NULL,12,'Invassive Carcinoma',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(6015,6,1,'Endometrial Polyps',NULL,15,'Endometrial',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(6018,6,1,'Low Grade Hyperplasia',NULL,18,'Low Grade Dysplasia',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(6019,6,1,'Middle Grade Hyperplasia',NULL,19,'Middle Grade Dysplasia',2);
insert into TermUpdate(id,pid,sid,name,Score,Seq,oldname,optype) values(6020,6,1,'High Grade Hyperplasia/ Carcinoma in Situ',NULL,20,'High Grade Dysplasia/ Carcinoma in Situ',2);
commit transaction;	

--图谱更新表
    create table ReferenceImageupdate
	(
	No              serial	PRIMARY KEY,
	TermID	 		int not null,    		/*有对照图片项目的代码，如检查、拟诊、评估项目的代码*/
	RefImagePath	varchar(100) ,				/*图像文件的存在路径*/
	Seq		int,
	Optype		int
	) ;

begin transaction;
--insert into ReferenceImage(TermID,RefImagePath,Seq) values (140101,E'ImageMap\\140101\\140101_1.jpg',1，0);
commit transaction;