本文整理汇总了Java中org.oscarehr.common.dao.Hl7TextInfoDao类的典型用法代码示例。如果您正苦于以下问题:Java Hl7TextInfoDao类的具体用法?Java Hl7TextInfoDao怎么用?Java Hl7TextInfoDao使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Hl7TextInfoDao类属于org.oscarehr.common.dao包,在下文中一共展示了Hl7TextInfoDao类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PatientExport
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的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: CreatePatient
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的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));
}
示例3: updateLabStatus
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private void updateLabStatus(int n) {
Hl7TextInfoDao dao = SpringUtils.getBean(Hl7TextInfoDao.class);
List<Hl7TextInfo> infos = dao.findAll();
for(int k = 0; k < infos.size() && n > 0; k++) {
Hl7TextInfo info = infos.get(k);
// only recheck the result status if it is not already set to abnormal
if (info.getResultStatus() == null || !info.getResultStatus().equals("A")) {
oscar.oscarLab.ca.all.parsers.MessageHandler h = Factory.getHandler("" + info.getLabNumber());
int i = 0;
int j = 0;
String resultStatus = "";
while (resultStatus.equals("") && i < h.getOBRCount()) {
j = 0;
while (resultStatus.equals("") && j < h.getOBXCount(i)) {
logger.info("obr(" + i + ") obx(" + j + ") abnormal ? : " + h.getOBXAbnormalFlag(i, j));
if (h.isOBXAbnormal(i, j)) {
resultStatus = "A";
Hl7TextInfo obj = hl7TextInfoDao.findLabId(info.getLabNumber());
if(obj != null) {
obj.setResultStatus("A");
hl7TextInfoDao.merge(obj);
}
}
j++;
}
i++;
}
}
n--;
}
}
示例4: updateLabStatus
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private void updateLabStatus(int n) {
Hl7TextInfoDao hl7TextInfoDao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
List<Hl7TextInfo> labList = hl7TextInfoDao.getAllLabsByLabNumberResultStatus();
Collections.sort(labList, Collections.reverseOrder(new Comparator<Hl7TextInfo>() {
public int compare(Hl7TextInfo o1, Hl7TextInfo o2) {
return o1.getId().compareTo(o2.getId());
}
}));
ListIterator<Hl7TextInfo> iter = labList.listIterator();
while (iter.hasNext() && n>0) {
Hl7TextInfo lab = iter.next();
if (!oscar.Misc.getString(lab.getResultStatus()).equals("A")) {
oscar.oscarLab.ca.all.parsers.MessageHandler h = Factory.getHandler(((Integer)lab.getLabNumber()).toString());
int i=0;
int j=0;
String resultStatus = "";
while(resultStatus.equals("") && i < h.getOBRCount()){
j = 0;
while(resultStatus.equals("") && j < h.getOBXCount(i)){
logger.info("obr("+i+") obx("+j+") abnormal ? : "+h.getOBXAbnormalFlag(i, j));
if(h.isOBXAbnormal(i, j)){
resultStatus = "A";
hl7TextInfoDao.updateResultStatusByLabId("A", lab.getLabNumber());
}
j++;
}
i++;
}
}
n--;
}
}
示例5: updateLabStatus
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private void updateLabStatus(int n) {
Hl7TextInfoDao hl7TextInfoDao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
List<Hl7TextInfo> labList = hl7TextInfoDao.getAllLabsByLabNumberResultStatus();
ListIterator<Hl7TextInfo> iter = labList.listIterator();
while (iter.hasNext() && n>0) {
if (!iter.next().getResultStatus().equals("A")) {
oscar.oscarLab.ca.all.parsers.MessageHandler h = Factory.getHandler(((Integer)iter.next().getLabNumber()).toString());
int i=0;
int j=0;
String resultStatus = "";
while(resultStatus.equals("") && i < h.getOBRCount()){
j = 0;
while(resultStatus.equals("") && j < h.getOBXCount(i)){
logger.info("obr("+i+") obx("+j+") abnormal ? : "+h.getOBXAbnormalFlag(i, j));
if(h.isOBXAbnormal(i, j)){
resultStatus = "A";
hl7TextInfoDao.updateResultStatusByLabId("A", iter.next().getLabNumber());
}
j++;
}
i++;
}
}
n--;
}
}
示例6: updateLabStatus
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private void updateLabStatus(int n) {
Hl7TextInfoDao hl7TextInfoDao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
List<Hl7TextInfo> labList = hl7TextInfoDao.getAllLabsByLabNumberResultStatus();
ListIterator<Hl7TextInfo> iter = labList.listIterator();
while (iter.hasNext() && n>0) {
if (!iter.next().getResultStatus().equals("A")) {
oscar.oscarLab.ca.all.parsers.MessageHandler h = Factory.getHandler(((Integer)iter.next().getLabNumber()).toString());
int i=0;
int j=0;
String resultStatus = "";
while(resultStatus.equals("") && i < h.getOBRCount()){
j = 0;
while(resultStatus.equals("") && j < h.getOBXCount(i)){
logger.info("obr("+i+") obx("+j+") abnormal ? : "+h.getOBXAbnormalFlag(i, j));
if(h.isOBXAbnormal(i, j)){
resultStatus = "A";
hl7TextInfoDao.updateResultStatusByLabId("A", iter.next().getLabNumber());
}
j++;
}
i++;
}
}
n--;
}
}
示例7: updateLabStatus
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private void updateLabStatus(final int abnormalLabsCountToBeRechecked) {
Hl7TextInfoDao dao = SpringUtils.getBean(Hl7TextInfoDao.class);
List<Hl7TextInfo> infos = dao.findAll();
Iterator<Hl7TextInfo> it = infos.iterator();
int n = abnormalLabsCountToBeRechecked;
while (it.hasNext() && n > 0) {
Hl7TextInfo info = it.next();
// only recheck the result status if it is not already set to abnormal
if (!"A".equals(info.getResultStatus())) {
oscar.oscarLab.ca.all.parsers.MessageHandler h = Factory.getHandler("" + info.getLabNumber());
int i = 0, j = 0;
String resultStatus = "";
while (resultStatus.equals("") && i < h.getOBRCount()) {
j = 0;
while (resultStatus.equals("") && j < h.getOBXCount(i)) {
if (h.isOBXAbnormal(i, j)) {
resultStatus = "A";
Hl7TextInfo obj = hl7TextInfoDao.findLabId(info.getLabNumber());
if (obj != null) {
obj.setResultStatus("A");
hl7TextInfoDao.merge(obj);
}
}
j++;
}
i++;
}
}
n--;
}
}
示例8: getMatchingGDMLLabsByAccessionNo
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private ArrayList<String> getMatchingGDMLLabsByAccessionNo(String hl7Body) {
Base64 base64 = new Base64(0);
ArrayList<String> ret = new ArrayList<String>();
int monthsBetween = 0;
Hl7TextInfoDao hl7TextInfoDao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
try {
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
java.util.Date dateB = formatter.parse(getServiceDate());
List<Hl7TextMessageInfo2> matchingLabs = hl7TextInfoDao.getMatchingLabsByAccessionNo(getAccessionNum());
for ( Hl7TextMessageInfo2 l: matchingLabs ) {
Date dateA = UtilDateUtilities.StringToDate(l.labDate_A,"yyyy-MM-dd hh:mm:ss");
if (dateA.before(dateB)) {
monthsBetween = UtilDateUtilities.getNumMonths(dateA, dateB);
} else {
monthsBetween = UtilDateUtilities.getNumMonths(dateB, dateA);
}
if (monthsBetween < 4) {
ret.add(new String(base64.decode(l.message.getBytes("ASCII")), "ASCII"));
}
if(hl7Body.equals(new String(base64.decode(l.message.getBytes("ASCII")), "ASCII"))){
logger.error("same message ");
break;
}
}
} catch (Exception e) {
logger.error("Exception in HL7 getMatchingGDMLLabsByAccessionNo: ", e);
}
// if there have been no labs added to the database yet just return this
// lab
if (ret.size() == 0)
ret.add(hl7Body);
return ret;
}
示例9: getMatchingGDMLLabs
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private ArrayList<String> getMatchingGDMLLabs(String hl7Body) {
Base64 base64 = new Base64(0);
ArrayList<String> ret = new ArrayList<String>();
int monthsBetween = 0;
Hl7TextInfoDao hl7TextInfoDao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
try {
List<Hl7TextMessageInfo> matchingLabs = hl7TextInfoDao.getMatchingLabs(hl7Body);
for ( Hl7TextMessageInfo l: matchingLabs ) {
Date dateA = UtilDateUtilities.StringToDate(l.labDate_A,"yyyy-MM-dd hh:mm:ss");
Date dateB = UtilDateUtilities.StringToDate(l.labDate_B,"yyyy-MM-dd hh:mm:ss");
if (dateA.before(dateB)) {
monthsBetween = UtilDateUtilities.getNumMonths(dateA, dateB);
} else {
monthsBetween = UtilDateUtilities.getNumMonths(dateB, dateA);
}
if (monthsBetween < 4) {
ret.add(new String(base64.decode(l.message.getBytes("ASCII")), "ASCII"));
}
if (l.lab_no_A==l.lab_no_B)
break;
}
} catch (Exception e) {
logger.error("Exception in HL7 getMatchingLabs: ", e);
}
// if there have been no labs added to the database yet just return this
// lab
if (ret.size() == 0)
ret.add(hl7Body);
return ret;
}
示例10: getMatchingHL7Labs
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private ArrayList<String> getMatchingHL7Labs(String hl7Body) {
Base64 base64 = new Base64(0);
ArrayList<String> ret = new ArrayList<String>();
int monthsBetween = 0;
Hl7TextInfoDao hl7TextInfoDao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
try {
List<Hl7TextMessageInfo> matchingLabs = hl7TextInfoDao.getMatchingLabs(hl7Body);
for (Hl7TextMessageInfo l: matchingLabs ) {
Date dateA = UtilDateUtilities.StringToDate(l.labDate_A,"yyyy-MM-dd hh:mm:ss");
Date dateB = UtilDateUtilities.StringToDate(l.labDate_B,"yyyy-MM-dd hh:mm:ss");
if (dateA.before(dateB)) {
monthsBetween = UtilDateUtilities.getNumMonths(dateA, dateB);
} else {
monthsBetween = UtilDateUtilities.getNumMonths(dateB, dateA);
}
if (monthsBetween < 4) {
ret.add(new String(base64.decode(l.message.getBytes("ASCII")), "ASCII"));
}
if (l.lab_no_A==l.lab_no_B)
break;
}
} catch (Exception e) {
logger.error("Exception in HL7 getMatchingLabs: ", e);
}
// if there have been no labs added to the database yet just return this
// lab
if (ret.size() == 0)
ret.add(hl7Body);
return ret;
}
示例11: getMatchingHL7Labs
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private ArrayList<String> getMatchingHL7Labs(String hl7Body) {
Base64 base64 = new Base64(0);
ArrayList<String> ret = new ArrayList<String>();
int monthsBetween = 0;
Hl7TextInfoDao hl7TextInfoDao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
try {
List<Hl7TextMessageInfo> matchingLabs = hl7TextInfoDao.getMatchingLabs(hl7Body);
for ( Hl7TextMessageInfo l: matchingLabs ) {
Date dateA = UtilDateUtilities.StringToDate(l.labDate_A,"yyyy-MM-dd hh:mm:ss");
Date dateB = UtilDateUtilities.StringToDate(l.labDate_B,"yyyy-MM-dd hh:mm:ss");
if (dateA.before(dateB)) {
monthsBetween = UtilDateUtilities.getNumMonths(dateA, dateB);
} else {
monthsBetween = UtilDateUtilities.getNumMonths(dateB, dateA);
}
if (monthsBetween < 4) {
ret.add(new String(base64.decode(l.message.getBytes("ASCII")), "ASCII"));
}
if (l.lab_no_A==l.lab_no_B)
break;
}
} catch (Exception e) {
logger.error("Exception in HL7 getMatchingLabs: ", e);
}
// if there have been no labs added to the database yet just return this
// lab
if (ret.size() == 0)
ret.add(hl7Body);
return ret;
}
示例12: getMatchingPFHTlabs
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private ArrayList<String> getMatchingPFHTlabs(String hl7Body){
Base64 base64 = new Base64(0);
ArrayList<String> ret = new ArrayList<String>();
int monthsBetween = 0;
Hl7TextInfoDao hl7TextInfoDao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
try{
List<Hl7TextMessageInfo> matchingLabs = hl7TextInfoDao.getMatchingLabs(hl7Body);
for ( Hl7TextMessageInfo l: matchingLabs ) {
Date dateA = UtilDateUtilities.StringToDate(l.labDate_A,"yyyy-MM-dd hh:mm:ss");
Date dateB = UtilDateUtilities.StringToDate(l.labDate_B,"yyyy-MM-dd hh:mm:ss");
if (dateA.before(dateB)) {
monthsBetween = UtilDateUtilities.getNumMonths(dateA, dateB);
} else {
monthsBetween = UtilDateUtilities.getNumMonths(dateB, dateA);
}
if (monthsBetween < 4) {
ret.add(new String(base64.decode(l.message.getBytes("ASCII")), "ASCII"));
}
if (l.lab_no_A==l.lab_no_B)
break;
}
}catch(Exception e){
logger.error("Exception in HL7 getMatchingLabs: ", e);
}
//if there have been no labs added to the database yet just return this lab
if (ret.size() == 0)
ret.add(hl7Body);
return ret;
}
示例13: getMatchingHL7Labs
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private ArrayList<String> getMatchingHL7Labs(String hl7Body) {
Base64 base64 = new Base64(0);
ArrayList<String> ret = new ArrayList<String>();
int monthsBetween = 0;
Hl7TextInfoDao hl7TextInfoDao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
try {
List<Hl7TextMessageInfo> matchingLabs = hl7TextInfoDao.getMatchingLabs(hl7Body);
for ( Hl7TextMessageInfo l: matchingLabs ) {
Date dateA = UtilDateUtilities.StringToDate(l.labDate_A,"yyyy-MM-dd hh:mm:ss");
Date dateB = UtilDateUtilities.StringToDate(l.labDate_B,"yyyy-MM-dd hh:mm:ss");
if (dateA.before(dateB)) {
monthsBetween = UtilDateUtilities.getNumMonths(dateA, dateB);
} else {
monthsBetween = UtilDateUtilities.getNumMonths(dateB, dateA);
}
if (monthsBetween < 4) {
ret.add(new String(base64.decode(l.message.getBytes("ASCII")), "ASCII"));
}
if (l.lab_no_A==l.lab_no_B)
break;
}
} catch (Exception e) {
logger.error("Exception in HL7 getMatchingLabs: ", e);
}
// if there have been no labs added to the database yet just return this
// lab
if (ret.size() == 0)
ret.add(hl7Body);
return ret;
}
示例14: getMatchingBioTestLabs
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
private ArrayList<String> getMatchingBioTestLabs(String hl7Body) {
Base64 base64 = new Base64(0);
ArrayList<String> ret = new ArrayList<String>();
int monthsBetween = 0;
Hl7TextInfoDao hl7TextInfoDao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
try {
List<Hl7TextMessageInfo> matchingLabs = hl7TextInfoDao.getMatchingLabs(hl7Body);
for ( Hl7TextMessageInfo l: matchingLabs ) {
Date dateA = UtilDateUtilities.StringToDate(l.labDate_A,"yyyy-MM-dd hh:mm:ss");
Date dateB = UtilDateUtilities.StringToDate(l.labDate_B,"yyyy-MM-dd hh:mm:ss");
if (dateA.before(dateB)) {
monthsBetween = UtilDateUtilities.getNumMonths(dateA, dateB);
} else {
monthsBetween = UtilDateUtilities.getNumMonths(dateB, dateA);
}
if (monthsBetween < 4) {
ret.add(new String(base64.decode(l.message.getBytes("ASCII")), "ASCII"));
}
if (l.lab_no_A==l.lab_no_B)
break;
}
} catch (Exception e) {
logger.error("Exception in HL7 getMatchingLabs: ", e);
}
// if there have been no labs added to the database yet just return this
// lab
if (ret.size() == 0)
ret.add(hl7Body);
return ret;
}
示例15: execute
import org.oscarehr.common.dao.Hl7TextInfoDao; //导入依赖的package包/类
public ActionForward execute (ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response){
if(!securityInfoManager.hasPrivilege(LoggedInInfo.getLoggedInInfoFromSession(request), "_lab", "w", null)) {
throw new SecurityException("missing required security object (_lab)");
}
CreateLabelTDISForm frm = (CreateLabelTDISForm) form;
String label = frm.getLabel();//request.getParameter("label");
logger.info("Label before db insert ="+label);
String lab_no = frm.getLab_no();//request.getParameter("lab_no");
String ajaxcall=request.getParameter("ajaxcall");
if (label==null || label.equals("")) {
request.setAttribute("error", "Please enter a label");
}
//response.setContentType("application/json");
Hl7TextInfoDao hl7dao = (Hl7TextInfoDao) SpringUtils.getBean("hl7TextInfoDao");
try {
int labNum = Integer.parseInt(lab_no);
hl7dao.createUpdateLabelByLabNumber(label, labNum);
logger.info("Label created successfully.");
} catch (Exception e){
logger.error("Error inserting label into hl7TextInfo" + e);
request.setAttribute("error", "There was an error creating a label.");
}
logger.info("Label ="+label);
label = StringEscapeUtils.escapeJavaScript(label);
if( ajaxcall != null && !"null".equalsIgnoreCase(ajaxcall)) {
return null;
}
return mapping.findForward("complete");
}