//---------------------------------------------------------------------------
// 病理冰冻-石蜡符合情况
//---------------------------------------------------------------------------
// String _opacsconnection; 	约定的输入变量名
// String _modalitytype; 		约定的输入变量名
// TADOQuery _qryStudy; 		外部已定义的对象
// TADOQuery _qryImage; 		外部已定义的对象
// TADOQuery _qryCustom; 		外部已定义的对象

//---------------------------------------------------------------------------
String _opacsconnection;
String _modalitytype;

//---------------------------------------------------------------------------
// 主程序
//---------------------------------------------------------------------------
{
	int iStudyKey = _qryStudy.FieldByName("study_key").AsInteger;
	if (iStudyKey <= 0)
	{
		ShowMessage("没有可操作的记录！");
		return;
	}
	
	TForm pForm = new TForm(nil);
	pForm.Caption = "符合情况";
	pForm.Color = 0x00FFEEE5;
	pForm.Width = 248;
	pForm.Height = 80;
	pForm.BorderStyle = bsToolWindow;
	pForm.Position = poScreenCenter;
	////
	TButton btn1 = new TButton(pForm);
	btn1.Parent = pForm;
	btn1.Caption = "符合";
	btn1.Top = 20;
	btn1.Left = 20;
	btn1.Width = 60;
	btn1.ModalResult = mrYes;
	////
	TButton btn2 = new TButton(pForm);
	btn2.Parent = pForm;
	btn2.Caption = "不符合";
	btn2.Top = 20;
	btn2.Left = 90;
	btn2.Width = 60;
	btn2.ModalResult = mrNo;
	////
	TButton btn3 = new TButton(pForm);
	btn3.Parent = pForm;
	btn3.Caption = "取消";
	btn3.Top = 20;
	btn3.Left = 160;
	btn3.Width = 60;
	btn3.ModalResult = mrCancel;
	int iResult = pForm.ShowModal();
	
	delete btn1;
	delete btn2;
	delete btn3;
	delete pForm;
	
	String sResult = "";
	if (iResult == mrYes)
		sResult = "符合";
	else if (iResult == mrNo)
		sResult = "不符合";
	else
		return;
	
	int iTag = _qryStudy.Tag;
	_qryStudy.Tag = 99;
	_qryStudy.Edit();
	_qryStudy.FieldByName("report_diseasename").Value = sResult;
	_qryStudy.Post();
	_qryStudy.Tag = iTag;
}
