protected HealthCard GetHealthCardFromCache(Hashtable patientHealthCardCache, int patientID) { HealthCard hc = null; if (patientHealthCardCache[patientID] != null) { PatientActiveHealthCards hcs = (PatientActiveHealthCards)patientHealthCardCache[patientID]; if (hcs.MedicareCard != null) { hc = hcs.MedicareCard; } if (hcs.DVACard != null) { hc = hcs.DVACard; } } return(hc); }
protected HealthCard GetHealthCareCard(Hashtable bulkHealthCardHash, int patientID) { if (bulkHealthCardHash != null) // get from bulk cache of healthcards of all patients { PatientActiveHealthCards healthCards = (PatientActiveHealthCards)bulkHealthCardHash[patientID]; if (healthCards == null) { return(null); } else { return(this.claimType == ClaimType.Medicare ? healthCards.MedicareCard : healthCards.DVACard); } } else { HealthCard[] cards = HealthCardDB.GetAllByPatientID(patientID, false, this.claimType == ClaimType.Medicare ? -1 : -2); return(cards.Length > 0 ? cards[cards.Length - 1] : null); } }