예제 #1
0
 ///<summary></summary>
 public static void Update(EhrTrigger ehrTrigger)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), ehrTrigger);
         return;
     }
     Crud.EhrTriggerCrud.Update(ehrTrigger);
 }
예제 #2
0
 ///<summary></summary>
 public static long Insert(EhrTrigger ehrTrigger)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         ehrTrigger.EhrTriggerNum = Meth.GetLong(MethodBase.GetCurrentMethod(), ehrTrigger);
         return(ehrTrigger.EhrTriggerNum);
     }
     return(Crud.EhrTriggerCrud.Insert(ehrTrigger));
 }
예제 #3
0
파일: EhrTriggers.cs 프로젝트: mnisl/OD
		///<summary></summary>
		public static void Update(EhrTrigger ehrTrigger) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),ehrTrigger);
				return;
			}
			Crud.EhrTriggerCrud.Update(ehrTrigger);
		}
예제 #4
0
파일: EhrTriggers.cs 프로젝트: mnisl/OD
		///<summary></summary>
		public static long Insert(EhrTrigger ehrTrigger) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				ehrTrigger.EhrTriggerNum=Meth.GetLong(MethodBase.GetCurrentMethod(),ehrTrigger);
				return ehrTrigger.EhrTriggerNum;
			}
			return Crud.EhrTriggerCrud.Insert(ehrTrigger);
		}
예제 #5
0
파일: EhrTriggers.cs 프로젝트: mnisl/OD
		///<summary>Returns true if ListObjectMatches satisfies trigger conditions.</summary>
		private static bool OneOfEachCategoryHelper(EhrTrigger ehrTrigger,List<object> ListObjectMatches) {
			//problems
			if(ehrTrigger.ProblemDefNumList.Trim()!=""
				|| ehrTrigger.ProblemIcd9List.Trim()!=""
				|| ehrTrigger.ProblemIcd10List.Trim()!=""
				|| ehrTrigger.ProblemSnomedList.Trim()!="") 
			{
				//problem condition exists
				for(int i=0;i<ListObjectMatches.Count;i++) {
					if(ListObjectMatches[i].GetType().Name=="DiseaseDef") {
						break;//satisfied problem category, move on to next category
					}
					if(i==ListObjectMatches.Count-1) {
						return false;//made it to end of list and did not find a problem.
					}
				}//end list matches
			}//end problem
			//medication
			if(ehrTrigger.MedicationNumList.Trim()!=""
				|| ehrTrigger.RxCuiList.Trim()!=""
				|| ehrTrigger.CvxList.Trim()!="") 
			{
				//Medication condition exists
				for(int i=0;i<ListObjectMatches.Count;i++) {
					if(ListObjectMatches[i].GetType().Name=="Medication"
						|| ListObjectMatches[i].GetType().Name=="VaccineDef") {
						break;//satisfied medication category, move on to next category
					}
					if(i==ListObjectMatches.Count-1) {
						return false;//made it to end of list and did not find a problem.
					}
				}//end list matches
			}//end medication
			//allergy
			if(ehrTrigger.AllergyDefNumList.Trim()!="") {
				//Allergy condition exists
				for(int i=0;i<ListObjectMatches.Count;i++) {
					if(ListObjectMatches[i].GetType().Name=="AllergyDef") {
						break;//satisfied Allergy category, move on to next category
					}
					if(i==ListObjectMatches.Count-1) {
						return false;//made it to end of list and did not find a problem.
					}
				}//end list matches
			}//end allergy
			//lab-todo
			//vitals-todo
			//demographics-todo
			return true;
		}
예제 #6
0
 ///<summary>Returns true if ListObjectMatches satisfies trigger conditions.</summary>
 private static bool OneOfEachCategoryHelper(EhrTrigger ehrTrigger, List <object> ListObjectMatches)
 {
     //problems
     if (ehrTrigger.ProblemDefNumList.Trim() != "" ||
         ehrTrigger.ProblemIcd9List.Trim() != "" ||
         ehrTrigger.ProblemIcd10List.Trim() != "" ||
         ehrTrigger.ProblemSnomedList.Trim() != "")
     {
         //problem condition exists
         for (int i = 0; i < ListObjectMatches.Count; i++)
         {
             if (ListObjectMatches[i].GetType().Name == "DiseaseDef")
             {
                 break;                        //satisfied problem category, move on to next category
             }
             if (i == ListObjectMatches.Count - 1)
             {
                 return(false); //made it to end of list and did not find a problem.
             }
         }                      //end list matches
     }                          //end problem
     //medication
     if (ehrTrigger.MedicationNumList.Trim() != "" ||
         ehrTrigger.RxCuiList.Trim() != "" ||
         ehrTrigger.CvxList.Trim() != "")
     {
         //Medication condition exists
         for (int i = 0; i < ListObjectMatches.Count; i++)
         {
             if (ListObjectMatches[i].GetType().Name == "Medication" ||
                 ListObjectMatches[i].GetType().Name == "VaccineDef")
             {
                 break;                        //satisfied medication category, move on to next category
             }
             if (i == ListObjectMatches.Count - 1)
             {
                 return(false); //made it to end of list and did not find a problem.
             }
         }                      //end list matches
     }                          //end medication
     //allergy
     if (ehrTrigger.AllergyDefNumList.Trim() != "")
     {
         //Allergy condition exists
         for (int i = 0; i < ListObjectMatches.Count; i++)
         {
             if (ListObjectMatches[i].GetType().Name == "AllergyDef")
             {
                 break;                        //satisfied Allergy category, move on to next category
             }
             if (i == ListObjectMatches.Count - 1)
             {
                 return(false); //made it to end of list and did not find a problem.
             }
         }                      //end list matches
     }                          //end allergy
     //lab-todo
     //vitals-todo
     //demographics-todo
     return(true);
 }