public addHomeDate ( gov.va.medora.mdo.dao.AbstractConnection cxn, Patient patient ) : void | ||
cxn | gov.va.medora.mdo.dao.AbstractConnection | |
patient | Patient | |
Résultat | void |
internal Patient getHomeData(Patient patient) { PatientApi api = new PatientApi(); api.addHomeDate(mySession.ConnectionSet.BaseConnection, patient); return patient; }
internal void addHomeData(Patient patient) { if (patient == null) { return; } try { Site site = mySession.SiteTable.getSite(patient.CmorSiteId); DataSource src = site.getDataSourceByModality("HIS"); MySession newMySession = new MySession(mySession.FacadeName); AccountLib accountLib = new AccountLib(newMySession); UserTO visitUser = accountLib.visitAndAuthorize(mySession.MdwsConfiguration.AllConfigs[ConfigFileConstants.BSE_CONFIG_SECTION][MdwsConfigConstants.SERVICE_ACCOUNT_PASSWORD], patient.CmorSiteId, mySession.ConnectionSet.BaseConnection.DataSource.SiteId.Id, mySession.User.Name.LastNameFirst, mySession.User.Uid, mySession.User.SSN.toString(), "OR CPRS GUI CHART"); PatientApi patientApi = new PatientApi(); patient.LocalPid = patientApi.getLocalPid(newMySession.ConnectionSet.BaseConnection, patient.MpiPid); patientApi.addHomeDate(newMySession.ConnectionSet.BaseConnection, patient); newMySession.ConnectionSet.BaseConnection.disconnect(); } catch (Exception) { // just pass back patient unchanged } }