本文整理汇总了Java中org.oscarehr.common.dao.AllergyDao类的典型用法代码示例。如果您正苦于以下问题:Java AllergyDao类的具体用法?Java AllergyDao怎么用?Java AllergyDao使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AllergyDao类属于org.oscarehr.common.dao包,在下文中一共展示了AllergyDao类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PatientExport
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
public PatientExport(Integer demographicNo) {
demographicDao = SpringUtils.getBean(DemographicDao.class);
allergyDao = SpringUtils.getBean(AllergyDao.class);
measurementDao = SpringUtils.getBean(MeasurementDao.class);
measurementsExtDao = SpringUtils.getBean(MeasurementsExtDao.class);
caseManagementIssueDao = SpringUtils.getBean(CaseManagementIssueDAO.class);
caseManagementIssueNotesDao = SpringUtils.getBean(CaseManagementIssueNotesDao.class);
caseManagementNoteDao = SpringUtils.getBean(CaseManagementNoteDAO.class);
caseManagementNoteExtDao = SpringUtils.getBean(CaseManagementNoteExtDAO.class);
preventionDao = SpringUtils.getBean(PreventionDao.class);
preventionExtDao = SpringUtils.getBean(PreventionExtDao.class);
patientLabRoutingDao = SpringUtils.getBean(PatientLabRoutingDao.class);
hl7TextInfoDao = SpringUtils.getBean(Hl7TextInfoDao.class);
drugDao = SpringUtils.getBean(DrugDao.class);
dxResearchDao = SpringUtils.getBean(DxresearchDAO.class);
loaded = loadPatient(demographicNo);
}
示例2: getAllergies
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
public ActionForward getAllergies(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException {
Integer demographicNo = Integer.parseInt(request.getParameter("demographicNo"));
AllergyDao allergyDao = SpringUtils.getBean(AllergyDao.class);
List<Allergy> allergies = allergyDao.findActiveAllergies(demographicNo);
StringBuilder output = new StringBuilder();
for(Allergy allergy:allergies) {
output.append(allergy.getDescription());
if(allergy.getReaction()!=null) {
output.append(":" + allergy.getReaction());
}
output.append("\n");
}
JSONObject json = JSONObject.fromObject(new LabelValueBean("allergies",output.toString().trim()));
response.getWriter().println(json);
return null;
}
示例3: _init
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
private void _init() {
// this class was created before Oscar's Manager classes were discovered.
setDemographicDao( (DemographicDao) SpringUtils.getBean(DemographicDao.class) );
setAllergyDao( (AllergyDao) SpringUtils.getBean(AllergyDao.class) );
setDemographicCustDao( (DemographicCustDao) SpringUtils.getBean(DemographicCustDao.class) );
setDrugDao( (DrugDao) SpringUtils.getBean(DrugDao.class) );
setDrugReasonDao( (DrugReasonDao) SpringUtils.getBean(DrugReasonDao.class) );
setProviderDao( (ProviderDao) SpringUtils.getBean("providerDao") );
setAppointmentDao( (OscarAppointmentDao) SpringUtils.getBean(OscarAppointmentDao.class) );
setIcd9Dao( (Icd9Dao) SpringUtils.getBean(Icd9Dao.class) );
setFormBPMHDao( (FormBPMHDao) SpringUtils.getBean(FormBPMHDao.class) );
setProfessionalSpecialistDao( (ProfessionalSpecialistDao) SpringUtils.getBean(ProfessionalSpecialistDao.class) );
setSpecialtyDao( (ContactSpecialtyDao) SpringUtils.getBean(ContactSpecialtyDao.class) );
setProContactDao( (ProfessionalContactDao) SpringUtils.getBean(ProfessionalContactDao.class) );
setDemographicContactDao( (DemographicContactDao) SpringUtils.getBean(DemographicContactDao.class) );
setClinicDao( (ClinicDAO) SpringUtils.getBean(ClinicDAO.class) );
}
示例4: saveRxAllergy
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
private static Integer saveRxAllergy(Integer demographicNo, Date entryDate, String description, Integer typeCode, String reaction, Date startDate, String severity, String regionalId, String lifeStage) {
AllergyDao allergyDao=(AllergyDao) SpringUtils.getBean("allergyDao");
Allergy allergy=new Allergy();
allergy.setDemographicNo(demographicNo);
allergy.setEntryDate(entryDate);
if(StringUtils.isNullOrEmpty(description))
description="no description";
allergy.setDescription(description);
allergy.setTypeCode(typeCode);
allergy.setReaction(reaction);
allergy.setStartDate(startDate);
allergy.setSeverityOfReaction(severity);
allergy.setRegionalIdentifier(regionalId);
allergy.setLifeStage(lifeStage);
allergy.setArchived(false);
allergyDao.persist(allergy);
return(allergy.getId());
}
示例5: CreatePatient
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
public CreatePatient(Integer demographicNo) {
if(context == null) {
context = new ClassPathXmlApplicationContext(Constants.Runtime.SPRING_APPLICATION_CONTEXT);
}
demographicDao = context.getBean(DemographicDao.class);
clinicDao = context.getBean(ClinicDao.class);
allergyDao = context.getBean(AllergyDao.class);
measurementDao = context.getBean(MeasurementDao.class);
measurementsExtDao = context.getBean(MeasurementsExtDao.class);
caseManagementIssueDao = context.getBean(CaseManagementIssueDao.class);
caseManagementIssueNotesDao = context.getBean(CaseManagementIssueNotesDao.class);
caseManagementNoteDao = context.getBean(CaseManagementNoteDao.class);
caseManagementNoteExtDao = context.getBean(CaseManagementNoteExtDao.class);
preventionDao = context.getBean(PreventionDao.class);
preventionExtDao = context.getBean(PreventionExtDao.class);
patientLabRoutingDao = context.getBean(PatientLabRoutingDao.class);
hl7TextInfoDao = context.getBean(Hl7TextInfoDao.class);
drugDao = context.getBean(DrugDao.class);
dxResearchDao = context.getBean(DxresearchDao.class);
patientModel = new PatientModel();
patientModel.setLoaded(loadPatient(demographicNo));
}
示例6: saveRxAllergy
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
private static Integer saveRxAllergy(Integer demographicNo, Date entryDate, String description, Integer typeCode, String reaction, Date startDate, String severity, String regionalId, String lifeStage) {
AllergyDao allergyDao=(AllergyDao) SpringUtils.getBean("allergyDao");
Allergy allergy=new Allergy();
allergy.setDemographicNo(demographicNo);
allergy.setEntryDate(entryDate);
allergy.setDescription(description);
allergy.setTypeCode(typeCode);
allergy.setReaction(reaction);
allergy.setStartDate(startDate);
allergy.setSeverityOfReaction(severity);
allergy.setRegionalIdentifier(regionalId);
allergy.setLifeStage(lifeStage);
allergy.setArchived("0");
allergyDao.persist(allergy);
return(allergy.getId());
}
示例7: sendAllergiesToMyOscar
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
public static void sendAllergiesToMyOscar(LoggedInInfo loggedInInfo, MyOscarLoggedInInfo myOscarLoggedInInfo, Integer demographicId) throws ClassCastException {
// get last synced info
// get the items for the person which are changed since last sync
// for each item
// send the item or update it
Date startSyncTime = new Date();
SentToPHRTracking sentToPHRTracking = MyOscarMedicalDataManagerUtils.getExistingOrCreateInitialSentToPHRTracking(demographicId, OSCAR_ALLERGIES_DATA_TYPE, MyOscarLoggedInInfo.getMyOscarServerBaseUrl());
logger.debug("sendAllergiesToMyOscar : demographicId=" + demographicId + ", lastSyncTime=" + sentToPHRTracking.getSentDatetime());
AllergyDao allergyDao = (AllergyDao) SpringUtils.getBean("allergyDao");
List<Allergy> changedAllergies = allergyDao.findByDemographicIdUpdatedAfterDate(demographicId, sentToPHRTracking.getSentDatetime());
for (Allergy allergy : changedAllergies) {
logger.debug("sendAllergiesToMyOscar : allergyId=" + allergy.getId());
try {
MedicalDataTransfer4 medicalDataTransfer = toMedicalDataTransfer(loggedInInfo, myOscarLoggedInInfo, allergy);
// don't ask me why but allergies are currently changeable in oscar, therefore, they're never completed.
MyOscarMedicalDataManagerUtils.addMedicalData(loggedInInfo.getLoggedInProviderNo(),myOscarLoggedInInfo, medicalDataTransfer, OSCAR_ALLERGIES_DATA_TYPE, allergy.getId(), false, true);
} catch (Exception e) {
logger.error("Unexpected error", e);
}
}
sentToPHRTracking.setSentDatetime(startSyncTime);
sentToPHRTrackingDao.merge(sentToPHRTracking);
}
示例8: buildAllergies
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
private void buildAllergies(Demographic demo, PatientRecord patientRecord) {
String[] severity = new String[] {"MI","MO","LT","NO"};
AllergyDao allergyDao=(AllergyDao)SpringUtils.getBean("allergyDao");
List<Allergy> allergies = allergyDao.findActiveAllergies(demo.getDemographicNo());
int index;
Date date;
for( Allergy allergy: allergies ) {
AllergiesAndAdverseReactions xmlAllergies = patientRecord.addNewAllergiesAndAdverseReactions();
Integer typeCode = allergy.getTypeCode();
if (typeCode == null) {
xmlAllergies.setPropertyOfOffendingAgent(cdsDtCihi.PropertyOfOffendingAgent.UK);
} else {
if (typeCode == 13) xmlAllergies.setPropertyOfOffendingAgent(cdsDtCihi.PropertyOfOffendingAgent.DR);
else if(typeCode == 0) xmlAllergies.setPropertyOfOffendingAgent(cdsDtCihi.PropertyOfOffendingAgent.ND);
else xmlAllergies.setPropertyOfOffendingAgent(cdsDtCihi.PropertyOfOffendingAgent.UK);
}
xmlAllergies.setOffendingAgentDescription(allergy.getDescription());
try {
index = Integer.parseInt(allergy.getSeverityOfReaction());
}catch(Exception e ) {
index = 4;
}
if( index > 0 ) {
index -= 1;
}
xmlAllergies.setSeverity(cdsDtCihi.AdverseReactionSeverity.Enum.forString(severity[index]));
date = allergy.getStartDate();
if( date != null ) {
Util.putPartialDate(xmlAllergies.addNewStartDate(), date, PartialDate.ALLERGIES, allergy.getAllergyId(), PartialDate.ALLERGIES_STARTDATE);
}
}
}
示例9: before
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
@Before
public void before() {
dao = SpringUtils.getBean(AllergyDao.class);
allergy = dao.findAllergies(Constants.Runtime.VALID_DEMOGRAPHIC).get(0);
allergiesModel = new AllergiesModel(allergy);
nullAllergy = new Allergy();
nullAllergiesModel = new AllergiesModel(nullAllergy);
}
示例10: pushAllergies
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
private void pushAllergies(Date lastDataUpdated, Facility facility, DemographicWs demographicService, Integer demographicId) throws ShutdownException {
logger.debug("pushing demographicAllergies facilityId:" + facility.getId() + ", demographicId:" + demographicId);
AllergyDao allergyDao = (AllergyDao) SpringUtils.getBean("allergyDao");
List<Allergy> allergies = allergyDao.findByDemographicIdUpdatedAfterDate(demographicId, lastDataUpdated);
if (allergies.size() == 0) return;
ArrayList<CachedDemographicAllergy> cachedAllergies = new ArrayList<CachedDemographicAllergy>();
StringBuilder sentIds = new StringBuilder();
int i = 0;
for (Allergy allergy : allergies) {
CachedDemographicAllergy cachedAllergy = new CachedDemographicAllergy();
FacilityIdIntegerCompositePk facilityIdIntegerCompositePk = new FacilityIdIntegerCompositePk();
facilityIdIntegerCompositePk.setCaisiItemId(allergy.getAllergyId());
cachedAllergy.setFacilityIdIntegerCompositePk(facilityIdIntegerCompositePk);
if(allergy.getAgccs() != null){
cachedAllergy.setAgccs(allergy.getAgccs());
}
if(allergy.getAgcsp() != null){
cachedAllergy.setAgcsp(allergy.getAgcsp());
}
cachedAllergy.setAgeOfOnset(allergy.getAgeOfOnset());
cachedAllergy.setCaisiDemographicId(demographicId);
cachedAllergy.setDescription(allergy.getDescription());
cachedAllergy.setEntryDate(DateUtils.toGregorianCalendar(allergy.getEntryDate()));
if(allergy.getHiclSeqno() != null){
cachedAllergy.setHiclSeqNo(allergy.getHiclSeqno());
}
if(allergy.getHicSeqno() !=null){
cachedAllergy.setHicSeqNo(allergy.getHicSeqno());
}
cachedAllergy.setLifeStage(allergy.getLifeStage());
cachedAllergy.setOnSetCode(allergy.getOnsetOfReaction());
if (allergy.getDrugrefId() != null) cachedAllergy.setPickId(Integer.parseInt(allergy.getDrugrefId()));
cachedAllergy.setReaction(allergy.getReaction());
cachedAllergy.setRegionalIdentifier(allergy.getRegionalIdentifier());
cachedAllergy.setSeverityCode(allergy.getSeverityOfReaction());
if (allergy.getStartDate() != null) cachedAllergy.setStartDate(DateUtils.toGregorianCalendar(allergy.getStartDate()));
cachedAllergy.setTypeCode(allergy.getTypeCode());
cachedAllergies.add(cachedAllergy);
if((++i % 50) == 0) {
demographicService.setCachedDemographicAllergies(cachedAllergies);
throttleAndChecks();
cachedAllergies.clear();
}
sentIds.append("," + allergy.getAllergyId());
}
if(cachedAllergies.size() > 0) {
demographicService.setCachedDemographicAllergies(cachedAllergies);
throttleAndChecks();
}
conformanceTestLog(facility, "Allergy", sentIds.toString());
}
示例11: getAllergies
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
public List<Allergy> getAllergies(String demographic_no) {
AllergyDao allergyDao=(AllergyDao) SpringUtils.getBean("allergyDao");
return allergyDao.findAllergies(Integer.parseInt(demographic_no));
}
示例12: getAllergies
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
public static List<Allergy> getAllergies(int demographicId) {
AllergyDao allergyDao = SpringUtils.getBean(AllergyDao.class);
List<Allergy> allergyList = allergyDao.findAllergies(demographicId);
return allergyList;
}
示例13: getAllergyDao
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
public AllergyDao getAllergyDao() {
return allergyDao;
}
示例14: setAllergyDao
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
public void setAllergyDao(AllergyDao allergyDao) {
this.allergyDao = allergyDao;
}
示例15: setAllergyDao
import org.oscarehr.common.dao.AllergyDao; //导入依赖的package包/类
public void setAllergyDao(AllergyDao allergyDAO) {
this.allergyDAO = allergyDAO;
}