当前位置: 首页>>代码示例>>C#>>正文


C# OpenDentBusiness.Procedure类代码示例

本文整理汇总了C#中OpenDentBusiness.Procedure的典型用法代码示例。如果您正苦于以下问题:C# Procedure类的具体用法?C# Procedure怎么用?C# Procedure使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Procedure类属于OpenDentBusiness命名空间,在下文中一共展示了Procedure类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Update

		///<summary>Updates only the changed columns.</summary>
		public static bool Update(Procedure procedure,Procedure oldProcedure) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetBool(MethodBase.GetCurrentMethod(),procedure,oldProcedure);
			}
			if(oldProcedure.ProcStatus!=ProcStat.C && procedure.ProcStatus==ProcStat.C && procedure.Discount!=0) {//Setting the procedure to complete
				Adjustments.CreateAdjustmentForDiscount(procedure);
			}
			if(oldProcedure.ProcStatus==ProcStat.C && procedure.ProcStatus!=ProcStat.C) {//Setting a completed procedure to TP
				Adjustments.DeleteForProcedure(procedure.ProcNum);
			}
			bool result=Crud.ProcedureCrud.Update(procedure,oldProcedure);
			if(procedure.Note!=oldProcedure.Note
				|| procedure.UserNum!=oldProcedure.UserNum
				|| procedure.SigIsTopaz!=oldProcedure.SigIsTopaz
				|| procedure.Signature!=oldProcedure.Signature) 
			{
				ProcNote note=new ProcNote();
				note.PatNum=procedure.PatNum;
				note.ProcNum=procedure.ProcNum;
				note.UserNum=procedure.UserNum;
				note.Note=procedure.Note;
				note.SigIsTopaz=procedure.SigIsTopaz;
				note.Signature=procedure.Signature;
				ProcNotes.Insert(note);
			}
			return result;
		}
开发者ID:mnisl,项目名称:OD,代码行数:28,代码来源:Procedures.cs

示例2: SetComplete

		public static void SetComplete(Procedure proc,Patient pat,List<InsPlan> planList,List<PatPlan> patPlanList,List<ClaimProc> claimProcList,List<Benefit> benefitList,List<InsSub> subList) {
			Procedure procOld=proc.Copy();
			ProcedureCode procCode=ProcedureCodes.GetProcCode(proc.CodeNum);
			proc.DateEntryC=DateTime.Now;
			proc.ProcStatus=ProcStat.C;
			Procedures.Update(proc,procOld);
			Procedures.ComputeEstimates(proc,proc.PatNum,claimProcList,false,planList,patPlanList,benefitList,pat.Age,subList);

		}
开发者ID:mnisl,项目名称:OD,代码行数:9,代码来源:ProcedureT.cs

示例3: SetExtracted

		///<summary>The tooth number passed in should be in international format.</summary>
		public static void SetExtracted(string toothNumInternat, DateTime procDate,long patNum) {
			Procedure proc=new Procedure();
			proc.CodeNum=ProcedureCodes.GetCodeNum("71101");
			proc.PatNum=patNum;
			proc.ProcDate=procDate;
			proc.ToothNum=Tooth.FromInternat(toothNumInternat);
			proc.ProcStatus=ProcStat.EO;
			Procedures.Insert(proc);
			ToothInitialTC.SetMissing(toothNumInternat,patNum);
		}
开发者ID:mnisl,项目名称:OD,代码行数:11,代码来源:ProcTC.cs

示例4: AddProc

		///<summary>Procedure will have a completed status.  For surfaces, since the scripts are faulty, pass in the exact surfaces that should be in the db, no validation will be done, and those exact same surfaces are what will go out on claim.</summary>
		public static Procedure AddProc(string procCode,long patNum,DateTime procDate,string toothNum,string surf,double fee,string typeCodes,long provNum) {
			Procedure proc=new Procedure();
			ProcedureCode procedureCode=ProcedureCodes.GetProcCode(procCode);
			//procnum
			proc.PatNum=patNum;
			//aptnum
			proc.CodeNum=procedureCode.CodeNum;
			proc.ProcDate=procDate;
			proc.DateTP=proc.ProcDate;
			proc.ProcFee=fee;
			switch(toothNum) {
				case "":
					proc.ToothNum="";
					proc.Surf=surf;
					break;
				case "10":
					proc.ToothNum="";
					proc.Surf="UR";
					break;
				case "20":
					proc.ToothNum="";
					proc.Surf="UL";
					break;
				case "30":
					proc.ToothNum="";
					proc.Surf="LL";
					break;
				case "40":
					proc.ToothNum="";
					proc.Surf="LR";
					break;
				default:
					proc.ToothNum=Tooth.FromInternat(toothNum);
					proc.Surf=surf;//Tooth.SurfTidyFromDisplayToDb(surf,proc.ToothNum);
					break;
			}
			//ToothRange
			proc.Priority=0;
			proc.ProcStatus=ProcStat.C;
			proc.ProvNum=provNum;
			proc.Note="";
			proc.ClinicNum=0;
			//proc.Dx
			proc.MedicalCode="";
			proc.BaseUnits=0;
			proc.SiteNum=0;
			//nextaptnum
			proc.CanadianTypeCodes=typeCodes;
			Procedures.Insert(proc);
			//if an extraction, then mark previous procs hidden.  Skip.
			//Recalls.Synch(PatCur.PatNum);//skip
			//Procedures.ComputeEstimates(proc,patNum,new List<ClaimProc>(),true,planList,patPlanList,benefitList,age);
			return proc;
		}
开发者ID:mnisl,项目名称:OD,代码行数:55,代码来源:ProcTC.cs

示例5: CreateProcedure

		/// <summary>Returns the proc</summary>
		public static Procedure CreateProcedure(Patient pat,string procCodeStr,ProcStat procStatus,string toothNum,double procFee){
			Procedure proc=new Procedure();
			proc.CodeNum=ProcedureCodes.GetCodeNum(procCodeStr);
			proc.PatNum=pat.PatNum;
			proc.ProcDate=DateTime.Today;
			proc.ProcStatus=procStatus;
			proc.ProvNum=pat.PriProv;
			proc.ProcFee=procFee;
			proc.ToothNum=toothNum;
			proc.Prosthesis="I";
			Procedures.Insert(proc);
			return proc;
		}
开发者ID:mnisl,项目名称:OD,代码行数:14,代码来源:ProcedureT.cs

示例6: LogProcComplCreate

		///<summary>Creates securitylog entry for a completed procedure.  Set toothNum to empty string and it will be omitted from the log entry. toothNums can be null or empty.</summary>
		public static void LogProcComplCreate(long patNum,Procedure procCur,string toothNums) {
			//No need to check RemotingRole; no call to db.
			if(procCur==null) {
				return;//Nothing to do.  Should never happen.
			}
			ProcedureCode procCode=ProcedureCodes.GetProcCode(procCur.CodeNum);
			string logText=procCode.ProcCode+", ";
			if(toothNums!=null && toothNums.Trim()!="") {
				logText+=Lans.g("Procedures","Teeth")+": "+toothNums+", ";
			}
			logText+=Lans.g("Procedures","Fee")+": "+procCur.ProcFee.ToString("F")+", "+procCode.Descript;
			SecurityLogs.MakeLogEntry(Permissions.ProcComplCreate,patNum,logText);
		}
开发者ID:mnisl,项目名称:OD,代码行数:14,代码来源:ProcedureL.cs

示例7: Insert

		///<summary></summary>
		public static long Insert(Procedure procedure){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				procedure.ProcNum=Meth.GetLong(MethodBase.GetCurrentMethod(),procedure);
				return procedure.ProcNum;
			}
			Crud.ProcedureCrud.Insert(procedure);
			if(procedure.Note!="") {
				ProcNote note=new ProcNote();
				note.PatNum=procedure.PatNum;
				note.ProcNum=procedure.ProcNum;
				note.UserNum=procedure.UserNum;
				note.Note=procedure.Note;
				ProcNotes.Insert(note);
			}
			return procedure.ProcNum;
		}
开发者ID:mnisl,项目名称:OD,代码行数:17,代码来源:Procedures.cs

示例8: Update

		///<summary>Updates only the changed columns.</summary>
		public static void Update(Procedure procedure,Procedure oldProcedure) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),procedure,oldProcedure);
				return;
			}
			Crud.ProcedureCrud.Update(procedure,oldProcedure);
			if(procedure.Note!=oldProcedure.Note
				|| procedure.UserNum!=oldProcedure.UserNum
				|| procedure.SigIsTopaz!=oldProcedure.SigIsTopaz
				|| procedure.Signature!=oldProcedure.Signature) 
			{
				ProcNote note=new ProcNote();
				note.PatNum=procedure.PatNum;
				note.ProcNum=procedure.ProcNum;
				note.UserNum=procedure.UserNum;
				note.Note=procedure.Note;
				note.SigIsTopaz=procedure.SigIsTopaz;
				note.Signature=procedure.Signature;
				ProcNotes.Insert(note);
			}
		}
开发者ID:romeroyonatan,项目名称:opendental,代码行数:22,代码来源:Procedures.cs

示例9: butAdd_Click

		private void butAdd_Click(object sender,EventArgs e) {
			if(comboProvNum.SelectedIndex==-1) {
				MsgBox.Show(this,"Please select a dentist.");
				return;
			}
			FormProcCodes FormP=new FormProcCodes();
			FormP.IsSelectionMode=true;
			FormP.ShowDialog();
			if(FormP.DialogResult!=DialogResult.OK) {
				return;
			}
			Procedure ProcCur;
			ProcCur=new Procedure();//going to be an insert, so no need to set Procedures.CurOld
			ProcCur.CodeNum = FormP.SelectedCodeNum;
			//procnum
			ProcCur.PatNum=AptCur.PatNum;
			//aptnum
			//proccode
			//ProcCur.CodeNum=ProcedureCodes.GetProcCode(ProcCur.OldCode).CodeNum;//already set
			ProcCur.ProcDate=DateTimeOD.Today;
			ProcCur.DateTP=ProcCur.ProcDate;
			//int totUnits = ProcCur.BaseUnits + ProcCur.UnitQty;
			InsPlan priplan=null;
			InsSub prisub=null;
			//Family fam=Patients.GetFamily(AptCur.PatNum);
			//Patient pat=fam.GetPatient(AptCur.PatNum);
			//InsPlan[] planList=InsPlans.Refresh(fam);
			List<PatPlan> patPlanList=PatPlans.Refresh(pat.PatNum);
			if(patPlanList.Count>0) {
				prisub=InsSubs.GetSub(patPlanList[0].InsSubNum,SubList);
				priplan=InsPlans.GetPlan(prisub.PlanNum,PlanList);
			}
			//Check if it's a medical procedure.
			double insfee;
			bool isMed = false;
			ProcCur.MedicalCode=ProcedureCodes.GetProcCode(ProcCur.CodeNum).MedicalCode;
			if(ProcCur.MedicalCode != null && ProcCur.MedicalCode != "") {
				isMed = true;
			}
			//Get fee schedule for medical or dental.
			long feeSch;
			if(isMed) {
				feeSch=Fees.GetMedFeeSched(pat,PlanList,patPlanList,SubList);
			}
			else {
				feeSch=Fees.GetFeeSched(pat,PlanList,patPlanList,SubList);
			}
			//Get the fee amount for medical or dental.
			if(PrefC.GetBool(PrefName.MedicalFeeUsedForNewProcs) && isMed) {
				insfee=Fees.GetAmount0(ProcedureCodes.GetProcCode(ProcCur.MedicalCode).CodeNum,feeSch);
			}
			else {
				insfee=Fees.GetAmount0(ProcCur.CodeNum,feeSch);
			}
			if(priplan!=null && priplan.PlanType=="p") {//PPO
				double standardfee=Fees.GetAmount0(ProcCur.CodeNum,Providers.GetProv(Patients.GetProvNum(pat)).FeeSched);
				if(standardfee>insfee) {
					ProcCur.ProcFee=standardfee;
				}
				else {
					ProcCur.ProcFee=insfee;
				}
			}
			else {
				ProcCur.ProcFee=insfee;
			}
			//surf
			//ToothNum
			//Procedures.Cur.ToothRange
			//ProcCur.NoBillIns=ProcedureCodes.GetProcCode(ProcCur.ProcCode).NoBillIns;
			ProcCur.Priority=0;
			ProcCur.ProcStatus=ProcStat.TP;
			long aptProvNum=ProviderC.ListShort[0].ProvNum;
			if(comboProvNum.SelectedIndex!=-1) {
				aptProvNum=ProviderC.ListShort[comboProvNum.SelectedIndex].ProvNum;
			}
			long aptProvHyg=0;
			if(comboProvHyg.SelectedIndex>0) {
				aptProvHyg=ProviderC.ListShort[comboProvHyg.SelectedIndex-1].ProvNum;
			}
			if(ProcedureCodes.GetProcCode(ProcCur.CodeNum).IsHygiene
				&& aptProvHyg != 0) {
				ProcCur.ProvNum=aptProvHyg;
			}
			else {
				ProcCur.ProvNum=aptProvNum;
			}
			if(ProcedureCodes.GetProcCode(ProcCur.CodeNum).ProvNumDefault!=0) {//Override provider for procedures with a default provider
				ProcCur.ProvNum=ProcedureCodes.GetProcCode(ProcCur.CodeNum).ProvNumDefault;
			}
			ProcCur.Note="";
			ProcCur.ClinicNum=pat.ClinicNum;
			//dx
			//nextaptnum
			ProcCur.DateEntryC=DateTime.Now;
			ProcCur.BaseUnits=ProcedureCodes.GetProcCode(ProcCur.CodeNum).BaseUnits;
			ProcCur.SiteNum=pat.SiteNum;
			ProcCur.RevCode=ProcedureCodes.GetProcCode(ProcCur.CodeNum).RevenueCodeDefault;
			ProcCur.DiagnosticCode=PrefC.GetString(PrefName.ICD9DefaultForNewProcs);
			Procedures.Insert(ProcCur);
//.........这里部分代码省略.........
开发者ID:romeroyonatan,项目名称:opendental,代码行数:101,代码来源:FormApptEdit.cs

示例10: SetProvForProc

 ///<summary>Does not make call to db unless necessary.</summary>
 public static void SetProvForProc(Procedure proc,List<ClaimProc> ClaimProcList)
 {
     if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
         Meth.GetVoid(MethodBase.GetCurrentMethod(),proc,ClaimProcList);
         return;
     }
     for(int i=0;i<ClaimProcList.Count;i++) {
         if(ClaimProcList[i].ProcNum!=proc.ProcNum) {
             continue;
         }
         if(ClaimProcList[i].ProvNum==proc.ProvNum) {
             continue;//no change needed
         }
         ClaimProcList[i].ProvNum=proc.ProvNum;
         Update(ClaimProcList[i]);
     }
 }
开发者ID:nampn,项目名称:ODental,代码行数:18,代码来源:ClaimProcs.cs

示例11: CreateEst

 ///<summary>Used when creating a claim to create any missing claimProcs. Also used in FormProcEdit if click button to add Estimate.  Inserts it into db. It will still be altered after this to fill in the fields that actually attach it to the claim.</summary>
 public static void CreateEst(ClaimProc cp, Procedure proc, InsPlan plan,InsSub sub)
 {
     //No need to check RemotingRole; no call to db.
     cp.ProcNum=proc.ProcNum;
     //claimnum
     cp.PatNum=proc.PatNum;
     cp.ProvNum=proc.ProvNum;
     if(plan.PlanType=="c") {//capitation
         if(proc.ProcStatus==ProcStat.C) {//complete
             cp.Status=ClaimProcStatus.CapComplete;//in this case, a copy will be made later.
         }
         else {//usually TP status
             cp.Status=ClaimProcStatus.CapEstimate;
         }
     }
     else {
         cp.Status=ClaimProcStatus.Estimate;
     }
     cp.PlanNum=plan.PlanNum;
     cp.InsSubNum=sub.InsSubNum;
     cp.DateCP=proc.ProcDate;
     //Writeoff=0
     cp.AllowedOverride=-1;
     cp.Percentage=-1;
     cp.PercentOverride=-1;
     cp.CopayAmt=-1;
     cp.NoBillIns=false;
     cp.PaidOtherIns=-1;
     cp.BaseEst=0;
     cp.DedEst=-1;
     cp.DedEstOverride=-1;
     cp.InsEstTotal=0;
     cp.InsEstTotalOverride=-1;
     cp.CopayOverride=-1;
     cp.PaidOtherInsOverride=-1;
     cp.ProcDate=proc.ProcDate;
     cp.WriteOffEst=-1;
     cp.WriteOffEstOverride=-1;
     cp.ClinicNum=proc.ClinicNum;
     Insert(cp);
 }
开发者ID:nampn,项目名称:ODental,代码行数:42,代码来源:ClaimProcs.cs

示例12: GetToothQuadOrArch

		private static string GetToothQuadOrArch(Procedure proc,ProcedureCode procCode){
			switch(procCode.TreatArea){
				case TreatmentArea.Arch:
					//if(proc.Surf=="U"){
					return "00";
					//}
					//else{
					//	return "01";
					//}
				case TreatmentArea.Mouth:
				case TreatmentArea.None:
					return "00";
				case TreatmentArea.Quad:
					if(proc.Surf=="UR"){
						return "10";
					}
					else if(proc.Surf=="UL") {
						return "20";
					}
					else if(proc.Surf=="LR") {
						return "40";
					}
					else{//LL
						return "30";
					}
				case TreatmentArea.Sextant:
					if(proc.Surf=="1") {//Upper Right
						return "03";
					}
					else if(proc.Surf=="2") {//Upper Anterior
						return "04";
					}
					else if(proc.Surf=="3") {//Upper Left
						return "05";
					}
					else if(proc.Surf=="4") {//Lower Left
						return "06";
					}
					else if(proc.Surf=="5") {//Lower Anterior
						return "07";
					}
					else if(proc.Surf=="6") {//Lower Right
						return "08";
					}
					return "00";//Invalid or unspecified sextant.  This is also the number that represents "whole mouth" in Canada.
				case TreatmentArea.Surf:
				case TreatmentArea.Tooth:
					return Tooth.ToInternat(proc.ToothNum);
				case TreatmentArea.ToothRange:
					string[] range=proc.ToothRange.Split(',');
					if(range.Length==0 || !Tooth.IsValidDB(range[0])){
						return "00";
					}
					else if(Tooth.IsMaxillary(range[0])){
						return "00";
					}
					return "00";
			}
			return "00";//will never happen
		}
开发者ID:mnisl,项目名称:OD,代码行数:60,代码来源:Canadian.cs

示例13: GetUL

		/// <summary>Returns either 0,1,or 2</summary>
		public static string GetUL(Procedure proc,ProcedureCode procCode) {
			if(procCode.TreatArea==TreatmentArea.Arch) {
				if(proc.Surf=="U") {
					return "1";
				}
				if(proc.Surf=="L") {
					return "2";
				}
				return "0";//should never happen
			}
			else {
				return "0";
			}
		}
开发者ID:mnisl,项目名称:OD,代码行数:15,代码来源:Dutch.cs

示例14: SaveAndClose

		///<summary>MUST call EntriesAreValid first.  Used from OK_Click and from butSetComplete_Click</summary>
		private void SaveAndClose(){
			if(textProcFee.Text==""){
				textProcFee.Text="0";
			}
			ProcCur.PatNum=PatCur.PatNum;
			//ProcCur.Code=this.textProc.Text;
			ProcedureCode2=ProcedureCodes.GetProcCode(textProc.Text);
			ProcCur.CodeNum=ProcedureCode2.CodeNum;
			ProcCur.MedicalCode=textMedicalCode.Text;
			if(_snomedBodySite==null) {
				ProcCur.SnomedBodySite="";
			}
			else {
				ProcCur.SnomedBodySite=_snomedBodySite.SnomedCode;
			}
			ProcCur.DiagnosticCode=textDiagnosticCode.Text;
			ProcCur.IsPrincDiag=checkIsPrincDiag.Checked;
			ProcCur.CodeMod1 = textCodeMod1.Text;
			ProcCur.CodeMod2 = textCodeMod2.Text;
			ProcCur.CodeMod3 = textCodeMod3.Text;
			ProcCur.CodeMod4 = textCodeMod4.Text;
			ProcCur.UnitQty = PIn.Int(textUnitQty.Text);
			ProcCur.UnitQtyType=(ProcUnitQtyType)comboUnitType.SelectedIndex;
			ProcCur.RevCode = textRevCode.Text;
			ProcCur.DrugUnit=(EnumProcDrugUnit)comboDrugUnit.SelectedIndex;
			ProcCur.DrugQty=PIn.Float(textDrugQty.Text);
			if(ProcOld.ProcStatus!=ProcStat.C && ProcCur.ProcStatus==ProcStat.C){//Proc set complete.
				ProcCur.DateEntryC=DateTime.Now;//this triggers it to set to server time NOW().
				if(ProcCur.DiagnosticCode=="") {
					ProcCur.DiagnosticCode=PrefC.GetString(PrefName.ICD9DefaultForNewProcs);
				}
			}
			ProcCur.DateTP=PIn.Date(this.textDateTP.Text);
			ProcCur.ProcDate=PIn.Date(this.textDate.Text);
			DateTime dateT=PIn.DateT(this.textTimeStart.Text);
			ProcCur.ProcTime=new TimeSpan(dateT.Hour,dateT.Minute,0);
			if(Programs.UsingOrion || PrefC.GetBool(PrefName.ShowFeatureMedicalInsurance)) {
				dateT=ParseTime(textTimeStart.Text);
				ProcCur.ProcTime=new TimeSpan(dateT.Hour,dateT.Minute,0);
				dateT=ParseTime(textTimeEnd.Text);
				ProcCur.ProcTimeEnd=new TimeSpan(dateT.Hour,dateT.Minute,0);
			}
			ProcCur.ProcFee=PIn.Double(textProcFee.Text);
			//ProcCur.LabFee=PIn.PDouble(textLabFee.Text);
			//ProcCur.LabProcCode=textLabCode.Text;
			//MessageBox.Show(ProcCur.ProcFee.ToString());
			//Dx taken care of when radio pushed
			switch(ProcedureCode2.TreatArea){
				case TreatmentArea.Surf:
					ProcCur.ToothNum=Tooth.FromInternat(textTooth.Text);
					ProcCur.Surf=Tooth.SurfTidyFromDisplayToDb(textSurfaces.Text,ProcCur.ToothNum);
					break;
				case TreatmentArea.Tooth:
					ProcCur.Surf="";
					ProcCur.ToothNum=Tooth.FromInternat(textTooth.Text);
					break;
				case TreatmentArea.Mouth:
					ProcCur.Surf="";
					ProcCur.ToothNum="";	
					break;
				case TreatmentArea.Quad:
					//surf set when radio pushed
					ProcCur.ToothNum="";	
					break;
				case TreatmentArea.Sextant:
					//surf taken care of when radio pushed
					ProcCur.ToothNum="";	
					break;
				case TreatmentArea.Arch:
					//don't HAVE to select arch
					//taken care of when radio pushed
					ProcCur.ToothNum="";	
					break;
				case TreatmentArea.ToothRange:
					if (listBoxTeeth.SelectedItems.Count<1 && listBoxTeeth2.SelectedItems.Count<1) {
						MessageBox.Show(Lan.g(this,"Must pick at least 1 tooth"));
						return;
					}
          string range="";
					int idxAmer;
					for(int j=0;j<listBoxTeeth.SelectedIndices.Count;j++){
						idxAmer=listBoxTeeth.SelectedIndices[j];
						if(j!=0){
							range+=",";
						}
            range+=Tooth.labelsUniversal[idxAmer];
					}
					for(int j=0;j<listBoxTeeth2.SelectedIndices.Count;j++){
						idxAmer=listBoxTeeth2.SelectedIndices[j]+16;
						if(j!=0){
							range+=",";
						}
            range+=Tooth.labelsUniversal[idxAmer];
          }
			    ProcCur.ToothRange=range;
					ProcCur.Surf="";
					ProcCur.ToothNum="";	
					break;
			}
//.........这里部分代码省略.........
开发者ID:romeroyonatan,项目名称:opendental,代码行数:101,代码来源:FormProcEdit.cs

示例15: GenerateCcdSectionProcedures

		///<summary>Helper for GenerateCCD().</summary>
		private void GenerateCcdSectionProcedures(bool hasProcedure) {
			_w.WriteComment(@"
=====================================================================================================
Procedures
=====================================================================================================");
			List<Procedure> listProcsFiltered;
			if(!hasProcedure) {
				listProcsFiltered=new List<Procedure>();
			}
			else {
				listProcsFiltered=_listProcsFiltered;
			}
			Start("component");
			Start("section");
			TemplateId("2.16.840.1.113883.10.20.22.2.7.1");//Procedures section with coded entries required (Page 285).
			_w.WriteComment("Procedures section template");
			StartAndEnd("code","code","47519-4","codeSystem",strCodeSystemLoinc,"codeSystemName",strCodeSystemNameLoinc,"displayName","History of procedures");
			_w.WriteElementString("title","Procedures");
			Start("text");//The following text will be parsed as html with a style sheet to be human readable.
			if(listProcsFiltered.Count>0 && hasProcedure) {
				bool hasBodySite=false;
				for(int i=0;i<listProcsFiltered.Count;i++) {
					Snomed snomedBodySite=Snomeds.GetByCode(listProcsFiltered[i].SnomedBodySite);//snomedBodySite can be null if procCode.SnomedBodySite is blank or invalid.
					if(snomedBodySite!=null) {
						hasBodySite=true;
						break;
					}
				}
				Start("table","width","100%","border","1");
				Start("thead");
				Start("tr");
				_w.WriteElementString("th","Procedure");
				if(hasBodySite) {
					_w.WriteElementString("th","Body Site");
				}
				_w.WriteElementString("th","Date");
				End("tr");
				End("thead");
				Start("tbody");
				for(int i=0;i<listProcsFiltered.Count;i++) {
					ProcedureCode procCode=ProcedureCodes.GetProcCode(listProcsFiltered[i].CodeNum);
					Start("tr");
					if(Regex.IsMatch(procCode.ProcCode,"^D[0-9]{4}$")) {//CDT code (ADA code)
						_w.WriteElementString("td",procCode.ProcCode+" - "+procCode.Descript);
					}
					else if(Regex.IsMatch(procCode.ProcCode,"^[0-9]{5}$")) {//CPT-4 code (medical code)
						_w.WriteElementString("td",procCode.ProcCode+" - "+procCode.Descript);
					}
					else if(Snomeds.CodeExists(procCode.ProcCode)) {//The SNOMED CT code system contains numerical codes which are between 6 and 18 digits in length as far as we know. Should not overlap CPT codes.
						Snomed snomed=Snomeds.GetByCode(procCode.ProcCode);
						_w.WriteElementString("td",snomed.SnomedCode+" - "+snomed.Description);
					}
					else {//Unknown code.  Output a "blank" procedure row as required by CCD standard.
						_w.WriteElementString("td","");
					}
					if(hasBodySite) {
						Snomed snomedBodySite=Snomeds.GetByCode(listProcsFiltered[i].SnomedBodySite);//snomedBodySite can be null if procCode.SnomedBodySite is blank or invalid.
						if(snomedBodySite==null) {
							_w.WriteElementString("td","");
						}
						else {
							_w.WriteElementString("td",snomedBodySite.SnomedCode+" - "+snomedBodySite.Description);
						}
					}
					if(listProcsFiltered[i].ProcDate.Year<1880) {
						_w.WriteElementString("td","");
					}
					else {
						DateText("td",listProcsFiltered[i].ProcDate);
					}
					End("tr");
				}
				End("tbody");
				End("table");
			}
			else {
				_w.WriteString("None");
			}
			End("text");
			if(listProcsFiltered.Count==0) {//If there are no entries in the filtered list, then we want to add a dummy entry since at least one is required.
				Procedure proc=new Procedure();
				listProcsFiltered.Add(proc);
			}
			for(int i=0;i<listProcsFiltered.Count;i++) {
				ProcedureCode procCode=ProcedureCodes.GetProcCode(listProcsFiltered[i].CodeNum);
				Start("entry","typeCode","DRIV");
				Start("procedure","classCode","PROC","moodCode","EVN");
				TemplateId("2.16.840.1.113883.10.20.22.4.14");//Procedure Activity Section (Page 487).
				_w.WriteComment("Procedure Activity Template");
				Guid();
				//"This code in a procedure activity SHOULD be selected from LOINC (codeSystem 2.16.840.1.113883.6.1) or SNOMED CT (CodeSystem: 2.16.840.1.113883.6.96),
				//and MAY be selected from CPT-4 (CodeSystem: 2.16.840.1.113883.6.12), ICD9 Procedures (CodeSystem: 2.16.840.1.113883.6.104),
				//ICD10 Procedure Coding System (CodeSystem: 2.16.840.1.113883.6.4) (CONF:7657)."
				//In November of 2013, ONC addopted CDT into EHR certification. http://ehrintelligence.com/2013/11/05/ehr-adoption-may-be-easier-for-dentists-with-new-onc-ruling/
				//The CDT OID is 2.16.840.1.113883.6.13 and the code system description is cdt-ADAcodes.
				if(procCode.ProcCode==null) {//Happens when listProcsFiltered[i].CodeNum is invalid or 0 (we create a procedure with CodeNum=0 above this loop if the procedure list is empty).
					StartAndEnd("code","nullFlavor","UNK");//Unknown code.  Output a "blank" procedure row as required by CCD standard.
				}
				else if(Regex.IsMatch(procCode.ProcCode,"^D[0-9]{4}$")) {//CDT code (ADA code)
//.........这里部分代码省略.........
开发者ID:mnisl,项目名称:OD,代码行数:101,代码来源:EhrCCD.cs


注:本文中的OpenDentBusiness.Procedure类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。