///<summary></summary>
		public static void Update(VaccineDef vaccineDef){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				Meth.GetVoid(MethodBase.GetCurrentMethod(),vaccineDef);
				return;
			}
			Crud.VaccineDefCrud.Update(vaccineDef);
		}
		///<summary></summary>
		public static long Insert(VaccineDef vaccineDef){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				vaccineDef.VaccineDefNum=Meth.GetLong(MethodBase.GetCurrentMethod(),vaccineDef);
				return vaccineDef.VaccineDefNum;
			}
			return Crud.VaccineDefCrud.Insert(vaccineDef);
		}
Exemple #3
0
 ///<summary></summary>
 public static void Update(VaccineDef vaccineDef)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), vaccineDef);
         return;
     }
     Crud.VaccineDefCrud.Update(vaccineDef);
 }
Exemple #4
0
 ///<summary></summary>
 public static long Insert(VaccineDef vaccineDef)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         vaccineDef.VaccineDefNum = Meth.GetLong(MethodBase.GetCurrentMethod(), vaccineDef);
         return(vaccineDef.VaccineDefNum);
     }
     return(Crud.VaccineDefCrud.Insert(vaccineDef));
 }
Exemple #5
0
		///<summary>Helper for GenerateCCD().</summary>
		private void GenerateCcdSectionImmunizations(bool hasImmunization) {
			_w.WriteComment(@"
=====================================================================================================
Immunizations
=====================================================================================================");
			List<VaccinePat> listVaccinePatsFiltered;
			if(!hasImmunization) {
				listVaccinePatsFiltered=new List<VaccinePat>();
			}
			else {
				listVaccinePatsFiltered=_listVaccinePatsFiltered;
			}
			Start("component");
			Start("section");
			TemplateId("2.16.840.1.113883.10.20.22.2.2.1");//Immunizations section with coded entries required.
			_w.WriteComment("Immunizations section template");
			StartAndEnd("code","code","11369-6","codeSystem",strCodeSystemLoinc,"codeSystemName",strCodeSystemNameLoinc,"displayName","History of immunizations");
			_w.WriteElementString("title","Immunizations");
			Start("text");//The following text will be parsed as html with a style sheet to be human readable.
			if(listVaccinePatsFiltered.Count>0 && hasImmunization) {
				Start("table","width","100%","border","1");
				Start("thead");
				Start("tr");
				_w.WriteElementString("th","Vaccine");
				_w.WriteElementString("th","Date");
				_w.WriteElementString("th","Status");
				End("tr");
				End("thead");
				Start("tbody");
				for(int i=0;i<listVaccinePatsFiltered.Count;i++) {
					VaccineDef vaccineDef;
					if(listVaccinePatsFiltered[i].VaccineDefNum==0) {
						vaccineDef=new VaccineDef();
					}
					else {
						vaccineDef=VaccineDefs.GetOne(listVaccinePatsFiltered[i].VaccineDefNum);
					}
					Start("tr");
					Cvx cvx;
					if(String.IsNullOrEmpty(vaccineDef.CVXCode)) {
						cvx=new Cvx();
					}
					else {
						cvx=Cvxs.GetOneFromDb(vaccineDef.CVXCode);
					}
					if(String.IsNullOrEmpty(cvx.CvxCode)) {
						_w.WriteElementString("td","");
					}
					else {
						_w.WriteElementString("td",cvx.CvxCode+" - "+cvx.Description);
					}
					if(listVaccinePatsFiltered[i].DateTimeStart.Year<1880) {
						_w.WriteElementString("td","");
					}
					else {
						DateText("td",listVaccinePatsFiltered[i].DateTimeStart);
					}
					_w.WriteElementString("td","Completed");
					End("tr");
				}
				End("tbody");
				End("table");
			}
			else {
				_w.WriteString("None");
			}
			End("text");
			if(listVaccinePatsFiltered.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.
				VaccinePat vacPat=new VaccinePat();
				listVaccinePatsFiltered.Add(vacPat);
			}
			for(int i=0;i<listVaccinePatsFiltered.Count;i++) {
				VaccineDef vaccineDef;
				if(listVaccinePatsFiltered[i].VaccinePatNum==0) {
					vaccineDef=new VaccineDef();
				}
				else {
					vaccineDef=VaccineDefs.GetOne(listVaccinePatsFiltered[i].VaccineDefNum);
				}
				Start("entry","typeCode","DRIV");
				Start("substanceAdministration","classCode","SBADM","moodCode","EVN","negationInd",(listVaccinePatsFiltered[i].CompletionStatus==VaccineCompletionStatus.NotAdministered)?"true":"false");
				TemplateId("2.16.840.1.113883.10.20.22.4.52");
				_w.WriteComment("Immunization Activity Template");
				Guid();
				StartAndEnd("statusCode","code","completed");
				Start("effectiveTime");
				_w.WriteAttributeString("xsi","type",null,"IVL_TS");
				if(listVaccinePatsFiltered[i].DateTimeStart.Year<1880) {
					Attribs("nullFlavor","UNK");
				}
				else {
					Attribs("value",listVaccinePatsFiltered[i].DateTimeStart.ToString("yyyyMMdd"));
				}
				End("effectiveTime");
				Start("consumable");
				Start("manufacturedProduct","classCode","MANU");
				TemplateId("2.16.840.1.113883.10.20.22.4.54");
				_w.WriteComment("Immunization Medication Information");
				Start("manufacturedMaterial");
				if(String.IsNullOrEmpty(vaccineDef.CVXCode)) {
					StartAndEnd("code","nullFlavor","UNK");
				}
				else {
					Cvx cvx=Cvxs.GetOneFromDb(vaccineDef.CVXCode);
					StartAndEnd("code","code",cvx.CvxCode,"codeSystem",strCodeSystemCvx,"displayName",cvx.Description,"codeSystemName",strCodeSystemNameCvx);
				}
				End("manufacturedMaterial");
				End("manufacturedProduct");
				End("consumable");
				//Possibly add an Instructions Template
				End("substanceAdministration");
				End("entry");
			}
			End("section");
			End("component");
		}