///<summary></summary> public static void Update(EhrTrigger ehrTrigger) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(), ehrTrigger); return; } Crud.EhrTriggerCrud.Update(ehrTrigger); }
///<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)); }
///<summary></summary> public static void Update(EhrTrigger ehrTrigger) { if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(),ehrTrigger); return; } Crud.EhrTriggerCrud.Update(ehrTrigger); }
///<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); }
///<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; }
///<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); }