コード例 #1
0
ファイル: Interventions.cs プロジェクト: royedwards/DRDNet
        public static List <Intervention> Refresh(long patNum, InterventionCodeSet codeSet)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetObject <List <Intervention> >(MethodBase.GetCurrentMethod(), patNum, codeSet));
            }
            string command = "SELECT * FROM intervention WHERE PatNum = " + POut.Long(patNum) + " AND CodeSet = " + POut.Int((int)codeSet);

            return(Crud.InterventionCrud.SelectMany(command));
        }
コード例 #2
0
ファイル: Interventions.cs プロジェクト: royedwards/DRDNet
        ///<summary>Gets list of CodeValue strings from interventions with DateEntry in the last year and CodeSet equal to the supplied codeSet.
        ///Result list is grouped by CodeValue, CodeSystem even though we only return the list of CodeValues.  However, there are no codes in the
        ///EHR intervention code list that conflict between code systems, so we should never have a duplicate code in the returned list.</summary>
        public static List <string> GetAllForCodeSet(InterventionCodeSet codeSet)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetObject <List <string> >(MethodBase.GetCurrentMethod(), codeSet));
            }
            string command = "SELECT CodeValue FROM intervention WHERE CodeSet=" + POut.Int((int)codeSet) + " "
                             + "AND " + DbHelper.DtimeToDate("DateEntry") + ">=" + POut.Date(MiscData.GetNowDateTime().AddYears(-1)) + " "
                             + "GROUP BY CodeValue,CodeSystem";

            return(Db.GetListString(command));
        }
コード例 #3
0
ファイル: EhrCodes.cs プロジェクト: royedwards/DRDNet
        ///<summary>Returns a list of EhrCodes for the specified InterventionCodeSet and ValueSetOID for any medication interventions.  Results will
        ///contain both intervention codes and medication codes that have been used in the last year.</summary>
        public static List <EhrCode> GetForIntervAndMedByUse(InterventionCodeSet codeSet, List <string> listMedValueSetOIDs)
        {
            //get all MedicationPats where the RxCui is one of the RxCui strings for list of ValueSetOIDs provided
            List <string>  listMedPats       = MedicationPats.GetAllForRxCuis(GetForValueSetOIDs(listMedValueSetOIDs, true).Select(x => x.CodeValue).ToList());
            List <string>  listInterventions = Interventions.GetAllForCodeSet(codeSet);
            List <EhrCode> retVal            = new List <EhrCode>();

            foreach (string codeStr in listMedPats.Union(listInterventions))
            {
                EhrCode codeCur = Listt.FirstOrDefault(x => x.CodeValue == codeStr);
                if (codeCur == null)
                {
                    continue;
                }
                retVal.Add(codeCur);
            }
            //we might find the "wrong" ehr code, because a single code may be in multiple code sets. This is still a valid code.
            return(retVal.OrderBy(x => x.Description).ToList());
        }
コード例 #4
0
ファイル: FormVitalsignEdit2014.cs プロジェクト: mnisl/OD
		private string CalcOverUnderBMIHelper(float bmi) {
			if(ageBeforeJanFirst<18) {//Do not clasify children as over/underweight
				intervCodeSet=InterventionCodeSet.Nutrition;//we will sent Nutrition to FormInterventionEdit, but this could also be a physical activity intervention
				return "";
			}
			else if(ageBeforeJanFirst<65) {
				if(bmi<18.5) {
					intervCodeSet=InterventionCodeSet.BelowNormalWeight;
					return "Underweight";
				}
				else if(bmi<25) {
					return "";
				}
				else {
					intervCodeSet=InterventionCodeSet.AboveNormalWeight;
					return "Overweight";
				}
			}
			else {
				if(bmi<23) {
					intervCodeSet=InterventionCodeSet.BelowNormalWeight;
					return "Underweight";
				}
				else if(bmi<30) {
					return "";
				}
				else {
					intervCodeSet=InterventionCodeSet.AboveNormalWeight;
					return "Overweight";
				}
			}
			//do not save to DB until butOK_Click
		}
コード例 #5
0
		public static List<Intervention> Refresh(long patNum,InterventionCodeSet codeSet) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetObject<List<Intervention>>(MethodBase.GetCurrentMethod(),codeSet);
			}
			string command="SELECT * FROM intervention WHERE PatNum = "+POut.Long(patNum)+" AND CodeSet = "+POut.Int((int)codeSet);
			return Crud.InterventionCrud.SelectMany(command);
		}