asked on
MyGlobalVars.ssn = myUser.ssn;
MyGlobalVars.sex = myUser.sex;-----------Object is assigned Data Here ---
}
//------------- Got dob, ssn, and sex --------------------
//--------- Lookup Information from PatientInfo Table ---------
var filteredpatinfolist = from patinfo in dceClinicalWorks.patientinfos
where patinfo.pid == patient.p.pid
select new { patinfo };
foreach (var patinforec in filteredpatinfolist)
{
patientinfo myPatinfo = new patientinfo();
// Put variables here
}
//---
Console.WriteLine(String.Format("{0},{1},{2}", patient.p.pid, patient.p.ControlNo, patient.p.employername));
Console.ReadLine();
// ------- Instantiate Chart Relay Tables to Write To
MPI myMPI = new MPI();
PATIENT myCRpatient = new PATIENT();
PATIENT_PHONE_NUMBER myPatPhones = new PATIENT_PHONE_NUMBER();
Patient_Address myPatAddresses = new Patient_Address();
PATIENTS_ATTENDED_BY_DOCTOR myPatAttByDoc = new PATIENTS_ATTENDED_BY_DOCTOR();
PATIENT_IN myPatIns = new PATIENT_IN();
EMPLOYER myPatEmployers = new EMPLOYER();
BillingAlert myPatBillAlerts = new BillingAlert();
EligibilityStatus myPatElgStatus = new EligibilityStatus();
// =================== Collect MPI Table Information ===================
//
//
MyGlobalVars.initGuid = Guid.NewGuid();
myMPI.MPI1 = MyGlobalVars.initGuid;
myMPI.NPI = MyGlobalVars.docnpi;
myMPI.ModifiedDate = DateTime.Today;
int myPatAcctNum;
if (Int32.TryParse(patient.p.pid.ToString(), out myPatAcctNum))
{
// Success! myInt now contains the numeric value of myString
myMPI.EntitySystemAcctNum = myPatAcctNum.ToString();
MyGlobalVars.patacctnum = myPatAcctNum.ToString();
}
else
{
// Failed! MyInt is not defined.
}
myMPI.EntitySystemModifiedDate = DateTime.Today;
myMPI.SYSTEM_TYPE = "eClinicalWorks";
myMPI.DOB = MyGlobalVars.dob;
myMPI.SSN = MyGlobalVars.ssn;
myMPI.Sex = MyGlobalVars.sex.ToUpper(); ---------- Error Occurs Here ------