Exemplo n.º 1
0
 ///<summary>Inserts one MedLabFacAttach into the database.  Returns the new priKey.</summary>
 public static long Insert(MedLabFacAttach medLabFacAttach)
 {
     if (DataConnection.DBtype == DatabaseType.Oracle)
     {
         medLabFacAttach.MedLabFacAttachNum = DbHelper.GetNextOracleKey("medlabfacattach", "MedLabFacAttachNum");
         int loopcount = 0;
         while (loopcount < 100)
         {
             try {
                 return(Insert(medLabFacAttach, true));
             }
             catch (Oracle.ManagedDataAccess.Client.OracleException ex) {
                 if (ex.Number == 1 && ex.Message.ToLower().Contains("unique constraint") && ex.Message.ToLower().Contains("violated"))
                 {
                     medLabFacAttach.MedLabFacAttachNum++;
                     loopcount++;
                 }
                 else
                 {
                     throw ex;
                 }
             }
         }
         throw new ApplicationException("Insert failed.  Could not generate primary key.");
     }
     else
     {
         return(Insert(medLabFacAttach, false));
     }
 }
Exemplo n.º 2
0
        ///<summary>Inserts one MedLabFacAttach into the database.  Provides option to use the existing priKey.</summary>
        public static long Insert(MedLabFacAttach medLabFacAttach, bool useExistingPK)
        {
            if (!useExistingPK && PrefC.RandomKeys)
            {
                medLabFacAttach.MedLabFacAttachNum = ReplicationServers.GetKey("medlabfacattach", "MedLabFacAttachNum");
            }
            string command = "INSERT INTO medlabfacattach (";

            if (useExistingPK || PrefC.RandomKeys)
            {
                command += "MedLabFacAttachNum,";
            }
            command += "MedLabNum,MedLabResultNum,MedLabFacilityNum) VALUES(";
            if (useExistingPK || PrefC.RandomKeys)
            {
                command += POut.Long(medLabFacAttach.MedLabFacAttachNum) + ",";
            }
            command +=
                POut.Long(medLabFacAttach.MedLabNum) + ","
                + POut.Long(medLabFacAttach.MedLabResultNum) + ","
                + POut.Long(medLabFacAttach.MedLabFacilityNum) + ")";
            if (useExistingPK || PrefC.RandomKeys)
            {
                Db.NonQ(command);
            }
            else
            {
                medLabFacAttach.MedLabFacAttachNum = Db.NonQ(command, true, "MedLabFacAttachNum", "medLabFacAttach");
            }
            return(medLabFacAttach.MedLabFacAttachNum);
        }
Exemplo n.º 3
0
        ///<summary>Inserts one MedLabFacAttach into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(MedLabFacAttach medLabFacAttach, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO medlabfacattach (";

            if (!useExistingPK && isRandomKeys)
            {
                medLabFacAttach.MedLabFacAttachNum = ReplicationServers.GetKeyNoCache("medlabfacattach", "MedLabFacAttachNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "MedLabFacAttachNum,";
            }
            command += "MedLabNum,MedLabResultNum,MedLabFacilityNum) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(medLabFacAttach.MedLabFacAttachNum) + ",";
            }
            command +=
                POut.Long(medLabFacAttach.MedLabNum) + ","
                + POut.Long(medLabFacAttach.MedLabResultNum) + ","
                + POut.Long(medLabFacAttach.MedLabFacilityNum) + ")";
            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command);
            }
            else
            {
                medLabFacAttach.MedLabFacAttachNum = Db.NonQ(command, true, "MedLabFacAttachNum", "medLabFacAttach");
            }
            return(medLabFacAttach.MedLabFacAttachNum);
        }
Exemplo n.º 4
0
        ///<summary>Updates one MedLabFacAttach in the database.</summary>
        public static void Update(MedLabFacAttach medLabFacAttach)
        {
            string command = "UPDATE medlabfacattach SET "
                             + "MedLabNum         =  " + POut.Long(medLabFacAttach.MedLabNum) + ", "
                             + "MedLabResultNum   =  " + POut.Long(medLabFacAttach.MedLabResultNum) + ", "
                             + "MedLabFacilityNum =  " + POut.Long(medLabFacAttach.MedLabFacilityNum) + " "
                             + "WHERE MedLabFacAttachNum = " + POut.Long(medLabFacAttach.MedLabFacAttachNum);

            Db.NonQ(command);
        }
Exemplo n.º 5
0
		///<summary>Converts a DataTable to a list of objects.</summary>
		public static List<MedLabFacAttach> TableToList(DataTable table){
			List<MedLabFacAttach> retVal=new List<MedLabFacAttach>();
			MedLabFacAttach medLabFacAttach;
			for(int i=0;i<table.Rows.Count;i++) {
				medLabFacAttach=new MedLabFacAttach();
				medLabFacAttach.MedLabFacAttachNum= PIn.Long  (table.Rows[i]["MedLabFacAttachNum"].ToString());
				medLabFacAttach.MedLabNum         = PIn.Long  (table.Rows[i]["MedLabNum"].ToString());
				medLabFacAttach.MedLabResultNum   = PIn.Long  (table.Rows[i]["MedLabResultNum"].ToString());
				medLabFacAttach.MedLabFacilityNum = PIn.Long  (table.Rows[i]["MedLabFacilityNum"].ToString());
				retVal.Add(medLabFacAttach);
			}
			return retVal;
		}
Exemplo n.º 6
0
 ///<summary>Inserts one MedLabFacAttach into the database.  Returns the new priKey.  Doesn't use the cache.</summary>
 public static long InsertNoCache(MedLabFacAttach medLabFacAttach)
 {
     if (DataConnection.DBtype == DatabaseType.MySql)
     {
         return(InsertNoCache(medLabFacAttach, false));
     }
     else
     {
         if (DataConnection.DBtype == DatabaseType.Oracle)
         {
             medLabFacAttach.MedLabFacAttachNum = DbHelper.GetNextOracleKey("medlabfacattach", "MedLabFacAttachNum");                  //Cacheless method
         }
         return(InsertNoCache(medLabFacAttach, true));
     }
 }
Exemplo n.º 7
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <MedLabFacAttach> TableToList(DataTable table)
        {
            List <MedLabFacAttach> retVal = new List <MedLabFacAttach>();
            MedLabFacAttach        medLabFacAttach;

            foreach (DataRow row in table.Rows)
            {
                medLabFacAttach = new MedLabFacAttach();
                medLabFacAttach.MedLabFacAttachNum = PIn.Long(row["MedLabFacAttachNum"].ToString());
                medLabFacAttach.MedLabNum          = PIn.Long(row["MedLabNum"].ToString());
                medLabFacAttach.MedLabResultNum    = PIn.Long(row["MedLabResultNum"].ToString());
                medLabFacAttach.MedLabFacilityNum  = PIn.Long(row["MedLabFacilityNum"].ToString());
                retVal.Add(medLabFacAttach);
            }
            return(retVal);
        }
Exemplo n.º 8
0
 ///<summary>Returns true if Update(MedLabFacAttach,MedLabFacAttach) would make changes to the database.
 ///Does not make any changes to the database and can be called before remoting role is checked.</summary>
 public static bool UpdateComparison(MedLabFacAttach medLabFacAttach, MedLabFacAttach oldMedLabFacAttach)
 {
     if (medLabFacAttach.MedLabNum != oldMedLabFacAttach.MedLabNum)
     {
         return(true);
     }
     if (medLabFacAttach.MedLabResultNum != oldMedLabFacAttach.MedLabResultNum)
     {
         return(true);
     }
     if (medLabFacAttach.MedLabFacilityNum != oldMedLabFacAttach.MedLabFacilityNum)
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 9
0
        ///<summary>Updates one MedLabFacAttach in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
        public static bool Update(MedLabFacAttach medLabFacAttach, MedLabFacAttach oldMedLabFacAttach)
        {
            string command = "";

            if (medLabFacAttach.MedLabNum != oldMedLabFacAttach.MedLabNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "MedLabNum = " + POut.Long(medLabFacAttach.MedLabNum) + "";
            }
            if (medLabFacAttach.MedLabResultNum != oldMedLabFacAttach.MedLabResultNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "MedLabResultNum = " + POut.Long(medLabFacAttach.MedLabResultNum) + "";
            }
            if (medLabFacAttach.MedLabFacilityNum != oldMedLabFacAttach.MedLabFacilityNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "MedLabFacilityNum = " + POut.Long(medLabFacAttach.MedLabFacilityNum) + "";
            }
            if (command == "")
            {
                return(false);
            }
            command = "UPDATE medlabfacattach SET " + command
                      + " WHERE MedLabFacAttachNum = " + POut.Long(medLabFacAttach.MedLabFacAttachNum);
            Db.NonQ(command);
            return(true);
        }
Exemplo n.º 10
0
		///<summary>Inserts one MedLabFacAttach into the database.  Provides option to use the existing priKey.</summary>
		public static long Insert(MedLabFacAttach medLabFacAttach,bool useExistingPK){
			if(!useExistingPK && PrefC.RandomKeys) {
				medLabFacAttach.MedLabFacAttachNum=ReplicationServers.GetKey("medlabfacattach","MedLabFacAttachNum");
			}
			string command="INSERT INTO medlabfacattach (";
			if(useExistingPK || PrefC.RandomKeys) {
				command+="MedLabFacAttachNum,";
			}
			command+="MedLabNum,MedLabResultNum,MedLabFacilityNum) VALUES(";
			if(useExistingPK || PrefC.RandomKeys) {
				command+=POut.Long(medLabFacAttach.MedLabFacAttachNum)+",";
			}
			command+=
				     POut.Long  (medLabFacAttach.MedLabNum)+","
				+    POut.Long  (medLabFacAttach.MedLabResultNum)+","
				+    POut.Long  (medLabFacAttach.MedLabFacilityNum)+")";
			if(useExistingPK || PrefC.RandomKeys) {
				Db.NonQ(command);
			}
			else {
				medLabFacAttach.MedLabFacAttachNum=Db.NonQ(command,true);
			}
			return medLabFacAttach.MedLabFacAttachNum;
		}
Exemplo n.º 11
0
		///<summary>Inserts one MedLabFacAttach into the database.  Returns the new priKey.</summary>
		public static long Insert(MedLabFacAttach medLabFacAttach){
			if(DataConnection.DBtype==DatabaseType.Oracle) {
				medLabFacAttach.MedLabFacAttachNum=DbHelper.GetNextOracleKey("medlabfacattach","MedLabFacAttachNum");
				int loopcount=0;
				while(loopcount<100){
					try {
						return Insert(medLabFacAttach,true);
					}
					catch(Oracle.DataAccess.Client.OracleException ex){
						if(ex.Number==1 && ex.Message.ToLower().Contains("unique constraint") && ex.Message.ToLower().Contains("violated")){
							medLabFacAttach.MedLabFacAttachNum++;
							loopcount++;
						}
						else{
							throw ex;
						}
					}
				}
				throw new ApplicationException("Insert failed.  Could not generate primary key.");
			}
			else {
				return Insert(medLabFacAttach,false);
			}
		}
Exemplo n.º 12
0
		///<summary>Updates one MedLabFacAttach in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
		public static bool Update(MedLabFacAttach medLabFacAttach,MedLabFacAttach oldMedLabFacAttach){
			string command="";
			if(medLabFacAttach.MedLabNum != oldMedLabFacAttach.MedLabNum) {
				if(command!=""){ command+=",";}
				command+="MedLabNum = "+POut.Long(medLabFacAttach.MedLabNum)+"";
			}
			if(medLabFacAttach.MedLabResultNum != oldMedLabFacAttach.MedLabResultNum) {
				if(command!=""){ command+=",";}
				command+="MedLabResultNum = "+POut.Long(medLabFacAttach.MedLabResultNum)+"";
			}
			if(medLabFacAttach.MedLabFacilityNum != oldMedLabFacAttach.MedLabFacilityNum) {
				if(command!=""){ command+=",";}
				command+="MedLabFacilityNum = "+POut.Long(medLabFacAttach.MedLabFacilityNum)+"";
			}
			if(command==""){
				return false;
			}
			command="UPDATE medlabfacattach SET "+command
				+" WHERE MedLabFacAttachNum = "+POut.Long(medLabFacAttach.MedLabFacAttachNum);
			Db.NonQ(command);
			return true;
		}
Exemplo n.º 13
0
		///<summary>Updates one MedLabFacAttach in the database.</summary>
		public static void Update(MedLabFacAttach medLabFacAttach){
			string command="UPDATE medlabfacattach SET "
				+"MedLabNum         =  "+POut.Long  (medLabFacAttach.MedLabNum)+", "
				+"MedLabResultNum   =  "+POut.Long  (medLabFacAttach.MedLabResultNum)+", "
				+"MedLabFacilityNum =  "+POut.Long  (medLabFacAttach.MedLabFacilityNum)+" "
				+"WHERE MedLabFacAttachNum = "+POut.Long(medLabFacAttach.MedLabFacAttachNum);
			Db.NonQ(command);
		}
Exemplo n.º 14
0
 ///<summary>Inserts one MedLabFacAttach into the database.  Returns the new priKey.</summary>
 public static long Insert(MedLabFacAttach medLabFacAttach)
 {
     return(Insert(medLabFacAttach, false));
 }
Exemplo n.º 15
0
		///<summary>This will insert a new MedLabResult object and set _medLabResultCur.</summary>
		public static void ProcessOBX(HL7DefSegment segDef,SegmentHL7 obxSeg) {
			if(_medLabResultCur!=null) {
				//if _medLabResultCur already exists and we're about to start another OBX, save the changes to _medLabResultCur before instantiating a new one
				MedLabResults.Update(_medLabResultCur);
			}
			_medLabResultCur=new MedLabResult();
			_medLabResultCur.MedLabNum=_medLabCur.MedLabNum;
			_isObsValueNte=false;
			for(int i=0;i<segDef.hl7DefFields.Count;i++) {
				HL7DefField fieldDefCur=segDef.hl7DefFields[i];
				switch(fieldDefCur.FieldName) {
					case "obsID":
						_medLabResultCur.ObsID=obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						_medLabResultCur.ObsText=obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos,1);
						_medLabResultCur.ObsLoinc=obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos,3);
						_medLabResultCur.ObsLoincText=obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos,4);
						continue;
					case "obsIDSub":
						_medLabResultCur.ObsIDSub=obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						continue;
					case "obsValue":
						_medLabResultCur.ObsValue=obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						if(_medLabResultCur.ObsValue.ToLower()=="tnp") {
							_medLabResultCur.ObsValue="Test Not Performed";
						}
						DataSubtype dataSubType;
						try {
							dataSubType=(DataSubtype)Enum.Parse(typeof(DataSubtype),obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos,2),true);
						}
						catch(Exception ex){
							dataSubType=DataSubtype.Unknown;
						}
						_medLabResultCur.ObsSubType=dataSubType;
						continue;
					case "obsValueType":
						if(obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos).ToLower()=="tx") {//if value type is text (TX) the value will be in attached NTEs
							_isObsValueNte=true;
						}
						continue;
					case "obsUnits":
						if(_medLabResultCur.ObsValue.ToLower()=="test not performed") {//if TNP then we won't bother saving the units
							continue;
						}
						_medLabResultCur.ObsUnits=obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						if(obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos,1).Length>0) {
							if(_medLabResultCur.Note!=null && _medLabResultCur.Note.Length>0) {
								_medLabResultCur.Note+="\r\n";
							}
							_medLabResultCur.Note+="Units full text: "+obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos,1);
						}
						continue;
					case "obsRefRange":
						_medLabResultCur.ReferenceRange=obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						continue;
					case "obsAbnormalFlag":
						_medLabResultCur.AbnormalFlag=FieldParserMedLab.AbnormalFlagParse(obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos));
						continue;
					case "resultStatus":
						_medLabResultCur.ResultStatus=FieldParserMedLab.ResultStatusParse(obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos));
						continue;
					case "dateTimeObs":
						_medLabResultCur.DateTimeObs=FieldParserMedLab.DateTimeParse(obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos));
						continue;
					case "facilityID":
						_medLabResultCur.FacilityID=obxSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						continue;
					default:
						continue;
				}
			}
			_medLabResultCur.MedLabResultNum=MedLabResults.Insert(_medLabResultCur);
			if(_medLabResultCur.FacilityID=="") {//no facility ID in the OBX segment, can't link to facilities in the ZPS segments
				return;
			}
			if(!_dictFacilityCodeNum.ContainsKey(_medLabResultCur.FacilityID)) {//no facility in the ZPS segments with this facility ID
				return;
			}
			List<long> facNumList=_dictFacilityCodeNum[_medLabResultCur.FacilityID];//should only be one facility in the ZPS segments with this ID
			for(int i=0;i<facNumList.Count;i++) {
				MedLabFacAttach medLabAttachCur=new MedLabFacAttach();
				medLabAttachCur.MedLabFacilityNum=facNumList[i];
				medLabAttachCur.MedLabResultNum=_medLabResultCur.MedLabResultNum;
				MedLabFacAttaches.Insert(medLabAttachCur);
			}
		}
Exemplo n.º 16
0
		///<summary></summary>
		public static void ProcessOBR(HL7DefSegment segDef,SegmentHL7 obrSeg,MessageHL7 obrMsg) {
			char subcompChar='&';
			if(obrMsg.Delimiters.Length>3) {//it is possible they did not send all 4 of the delimiter chars, in which case we will use the default &
				subcompChar=obrMsg.Delimiters[3];
			}
			for(int i=0;i<segDef.hl7DefFields.Count;i++) {
				HL7DefField fieldDefCur=segDef.hl7DefFields[i];
				FieldHL7 fieldCur=obrSeg.GetField(fieldDefCur.OrdinalPos);//fieldCur can be null
				if(fieldCur==null) {
					continue;
				}
				switch(fieldDefCur.FieldName) {
					case "clinicalInfo":
						if(_isFirstObr) {
							_medLabCur.ClinicalInfo=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos).Trim();
						}
						continue;
					case "dateTimeCollected":
						_medLabCur.DateTimeCollected=FieldParserMedLab.DateTimeParse(obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos));
						continue;
					case "dateTimeEntered":
						_medLabCur.DateTimeEntered=FieldParserMedLab.DateTimeParse(obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos));
						continue;
					case "dateTimeReported":
						_medLabCur.DateTimeReported=FieldParserMedLab.DateTimeParse(obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos));
						continue;
					case "facilityID":
						string facIdCur=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						if(facIdCur=="") {
							continue;
						}
						if(!_dictFacilityCodeNum.ContainsKey(facIdCur)) {//no ZPS segments with this footnote ID
							continue;
						}
						List<long> facNumList=_dictFacilityCodeNum[facIdCur];//should only be one facility with this footnote ID in this message
						for(int j=0;j<facNumList.Count;j++) {
							MedLabFacAttach medLabAttachCur=new MedLabFacAttach();
							medLabAttachCur.MedLabFacilityNum=facNumList[j];
							medLabAttachCur.MedLabNum=_medLabCur.MedLabNum;
							MedLabFacAttaches.Insert(medLabAttachCur);
						}
						continue;
					case "obsTestID":
						if(obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos,2).ToLower()=="l") {
							_medLabCur.ObsTestID=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
							_medLabCur.ObsTestDescript=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos,1);
						}
						if(obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos,5).ToLower()=="ln") {
							_medLabCur.ObsTestLoinc=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos,3);
							_medLabCur.ObsTestLoincText=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos,4);
						}
						continue;
					case "orderingProv":
						if(_medLabCur.OrderingProvNPI==null || _medLabCur.OrderingProvNPI=="") {//may be filled from the ORC segment
							_medLabCur.OrderingProvNPI=FieldParserMedLab.OrderingProvIDParse(fieldCur,"N");
						}
						if(_medLabCur.OrderingProvLocalID==null || _medLabCur.OrderingProvLocalID=="") {//may be filled from the ORC segment
							_medLabCur.OrderingProvLocalID=FieldParserMedLab.OrderingProvIDParse(fieldCur,"L");
						}
						int k=0;
						if(_medLabCur.OrderingProvLName==null || _medLabCur.OrderingProvLName=="") {//may be filled from the ORC segment
							_medLabCur.OrderingProvLName=fieldCur.GetComponentVal(1).Trim();
							while(_medLabCur.OrderingProvLName=="" && k<fieldCur.ListRepeatFields.Count) {//if LName is not present in first repetition check others
								_medLabCur.OrderingProvLName=fieldCur.ListRepeatFields[k].GetComponentVal(1).Trim();
								k++;
							}
						}
						k=0;
						if(_medLabCur.OrderingProvFName==null || _medLabCur.OrderingProvFName=="") {//may be filled from the ORC segment
							_medLabCur.OrderingProvFName=fieldCur.GetComponentVal(2).Trim();
							while(_medLabCur.OrderingProvFName=="" && k<fieldCur.ListRepeatFields.Count) {//if FName is not present in first repetition check others
								_medLabCur.OrderingProvFName=fieldCur.ListRepeatFields[k].GetComponentVal(2).Trim();
								k++;
							}
						}
						#region Locate Provider
						if(_medLabCur.ProvNum!=0) {//may have located the provider from the ORC segment, nothing left to do
							continue;
						}
						_medicaidIdCur=FieldParserMedLab.OrderingProvIDParse(fieldCur,"P");
						List<Provider> listProvs=Providers.GetProvsByNpiOrMedicaidId(_medLabCur.OrderingProvNPI,_medicaidIdCur);
						listProvs.Sort(SortByNpiMedicaidIdMatch);
						if(listProvs.Count>0) {//if a provider with either a matching NPI or Medicaid ID is found, use the first matching prov
							_medLabCur.ProvNum=listProvs[0].ProvNum;
						}
						else {//no provider match based on NPI or MedicaidID
							listProvs=Providers.GetProvsByFLName(_medLabCur.OrderingProvLName,_medLabCur.OrderingProvFName);//must have both LName and FName
							if(listProvs.Count>0) {//use the first provider found with matching LName and FName
								_medLabCur.ProvNum=listProvs[0].ProvNum;
							}
						}
						#endregion Locate Provider
						continue;
					case "parentObsID":
						_medLabCur.ParentObsID=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						continue;
					case "parentObsTestID":
						_medLabCur.ParentObsTestID=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						continue;
					case "resultStatus":
						_medLabCur.ResultStatus=FieldParserMedLab.ResultStatusParse(obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos));
						continue;
					case "specimenAction":
						_medLabCur.ActionCode=FieldParserMedLab.ResultActionParse(obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos));
						continue;
					case "specimenID":
						if(_medLabCur.SpecimenID!=null && _medLabCur.SpecimenID!="") {//could be filled by value in ORC
							continue;
						}
						_medLabCur.SpecimenID=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						continue;
					case "specimenIDAlt":
						_medLabCur.SpecimenIDAlt=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						continue;
					case "specimenIDFiller":
						if(_medLabCur.SpecimenIDFiller!=null && _medLabCur.SpecimenIDFiller!="") {//could be filled by value in ORC
							continue;
						}
						_medLabCur.SpecimenIDFiller=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						continue;
					case "totalVolume":
						_medLabCur.TotalVolume=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos);
						if(_medLabCur.TotalVolume=="") {
							continue;
						}
						string[] unitsSubComp=obrSeg.GetFieldComponent(fieldDefCur.OrdinalPos,1).Split(new char[] { subcompChar },StringSplitOptions.None);
						if(unitsSubComp.Length==0 || unitsSubComp[0]=="") {
							_medLabCur.TotalVolume+=" ml";
							continue;
						}
						_medLabCur.TotalVolume+=" "+unitsSubComp[0];
						continue;
					default:
						continue;
				}
			}
			_isFirstObr=false;
			return;
		}