コード例 #1
0
ファイル: EhrMeasureEvents.cs プロジェクト: mnisl/OD
		///<summary></summary>
		public static List<EhrMeasureEvent> GetByType(List<EhrMeasureEvent> listMeasures,EhrMeasureEventType eventType) {
			//No need to check RemotingRole; no call to db.
			List<EhrMeasureEvent> retVal=new List<EhrMeasureEvent>();
			for(int i=0;i<listMeasures.Count;i++) {
				if(listMeasures[i].EventType==eventType) {
					retVal.Add(listMeasures[i]);
				}
			}
			return retVal;
		}
コード例 #2
0
ファイル: EhrMeasureEvents.cs プロジェクト: mnisl/OD
		///<summary>Gets a list of MeasureEvents.  Primarily used in FormEhrMeasureEvents.  Pass in true to get all EhrMeasureEvents for the date range.  Passing in true will ignore the specified measure event type.</summary>
		public static List<EhrMeasureEvent> GetAllByTypeFromDB(DateTime dateStart,DateTime dateEnd,EhrMeasureEventType measureEventType,bool isAll) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetObject<List<EhrMeasureEvent>>(MethodBase.GetCurrentMethod(),dateStart,dateEnd,measureEventType,isAll);
			}
			string command="SELECT * FROM ehrmeasureevent "
				+"WHERE DateTEvent >= "+POut.DateT(dateStart)+" "
				+"AND DateTEvent <= "+POut.DateT(dateEnd)+" ";
			if(!isAll) {
				command+="AND EventType = "+POut.Int((int)measureEventType)+" ";
			}
			command+="ORDER BY EventType,DateTEvent,PatNum";
			return Crud.EhrMeasureEventCrud.SelectMany(command);
		}