本文整理汇总了Java中ca.uhn.hl7v2.model.v24.segment.OBR类的典型用法代码示例。如果您正苦于以下问题:Java OBR类的具体用法?Java OBR怎么用?Java OBR使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OBR类属于ca.uhn.hl7v2.model.v24.segment包,在下文中一共展示了OBR类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getRadResultDetails
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private IfOcsRadResultVo getRadResultDetails(OBR obr, ORU_R01_ORCOBRNTECTDOBXNTEFT1CTI orc_group) throws Exception
{
LOG.debug("R01VoMapper getRadResultDetails: entry");
IfOcsRadResultVo radResVo = new IfOcsRadResultVo();
radResVo.setReportText(getReportTextFromOBXGroup(orc_group));
if (obr.getAssistantResultInterpreter().length > 0)
radResVo.setAuthoringRadiologistName(getNameFromNDL(obr.getAssistantResultInterpreter(0)));
if (obr.getTechnician().length > 0)
radResVo.setRadiographerName(getNameFromNDL(obr.getTechnician(0)));
radResVo.setExamDateTime(populateDateTimeVoFromTS(obr.getObservationDateTime()));
if (radResVo.getExamDateTimeIsNotNull())
radResVo.setExamTimeSupplied(Boolean.valueOf(radResVo.getExamDateTime().getTime() != null));
radResVo.setRadiographerName("");
// iSoft spec - "unused"
if (obr.getTranscriptionist().length > 0)
radResVo.setTranscriberName(getNameFromNDL(obr.getTranscriptionist(0)));
radResVo.setVerifyingRadiologistName(getNameFromNDL(obr.getPrincipalResultInterpreter()));
LOG.debug("R01VoMapper getRadResultDetails: exit");
return radResVo;
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:24,代码来源:R01VoMapper.java
示例2: shouldProcessMessage
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
public boolean shouldProcessMessage(@Body ORU_R01 r01) throws HL7Exception {
boolean conformsFiller = true;
boolean conformsService = true;
int resultCount = r01.getPATIENT_RESULT().getORDER_OBSERVATIONReps();
for (int i = 0; i < resultCount && conformsFiller && conformsService; i++) {
OBR obr = r01.getPATIENT_RESULT().getORDER_OBSERVATION(i).getOBR();
conformsFiller = this.checkFillerOrderNumberConforms(obr
.getObr3_FillerOrderNumber().getEi1_EntityIdentifier()
.getValue());
conformsService = this.checkDiagnosticServiceConforms(obr
.getObr24_DiagnosticServSectID().getValue());
}
return (conformsFiller && conformsService);
}
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:20,代码来源:MicroAndBloodbankResultsFilter.java
示例3: updateOrderLevelValues
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
/**
* wdev-2367
* updateOrderLevelValues
* This method will update the Patient Location and Responsible Clinician if they are specified with a result message.
* @param ormMsg
* @param obr
* @param orc
* @param voOrder
* @param providerSystem
* @return
* @return
* @throws HL7Exception
* @throws StaleObjectException
*/
private IfOcsOrderVo updateOrderLevelValues(Message ormMsg, ORC orc, OBR obr, IfOcsOrderVo voOrder, ProviderSystemVo providerSystem) throws HL7Exception, StaleObjectException
{
PV1 pv1=null;
if (ormMsg instanceof ORM_O01)
{
pv1=((ORM_O01)ormMsg).getORM_O01_PIDPD1NTEPV1PV2IN1IN2IN3GT1AL1().getORM_O01_PV1PV2().getPV1();
}
else if (ormMsg instanceof OMG_O19)
{
pv1=((OMG_O19)ormMsg).getOMG_O19_PIDPD1NTEPV1PV2IN1IN2IN3GT1AL1().getOMG_O19_PV1PV2().getPV1();
}
else if (ormMsg instanceof ORU_R01)
{
pv1=((ORU_R01)ormMsg).getORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTECTDOBXNTEFT1CTI().getORU_R01_PIDPD1NK1NTEPV1PV2().getORU_R01_PV1PV2().getPV1();
}
if (pv1 != null)
{
populateLocationVoFromPL(pv1.getAssignedPatientLocation(), voOrder, providerSystem);
}
// ORC-12 Ordering provider
populateWithOrderingProvider(voOrder, orc, obr, providerSystem);
// wdev-3054 - Removed code that appends value to Additional Clinical Info as now only populated
// on un-solicited results
String errors[] = voOrder.validate();
if (errors != null)
throw new HL7Exception("Validation errors found for order - " + VoMapper.toDisplayString(errors));
voOrder = ocsIfInbound.saveOrderLevelItems(voOrder);
return voOrder;
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:48,代码来源:R01VoMapper.java
示例4: populateRADInvestigationVoFromOBR
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private IfOrderInvestigationVo populateRADInvestigationVoFromOBR(OBR obr, String sendingApplication, ProviderSystemVo providerSystem) throws Exception
{
IfOrderInvestigationVo orderInvVo = new IfOrderInvestigationVo();
String providerInvCode = obr.getUniversalServiceIdentifier().getIdentifier().getValue();
// wdev-2397 specimen source is now part of the search criteria to get the investigation
SPS sps = obr.getSpecimenSource();
IfProviderInvSearchVo search = new IfProviderInvSearchVo();
search.setProviderInvCode(providerInvCode);
search.setProvider(providerSystem);
search.setHl7App(sendingApplication);
search.setSpecimenSource(sps.getSpecimenSourceNameOrCode().getIdentifier().getValue());
IfInvestigationLiteVo invVo = ocsIfInbound.getInvestigationByHl7AppInvAndService(search);
if (invVo == null)
throw new HL7Exception("Investigation not found for provider system and providerInvCode = " + providerInvCode);
fillRADInvestigationFromOBR(orderInvVo, obr, invVo,providerSystem);
// OBR-27 Quantity/timing
// wdev-2746 - If obr-27 is not populated, we can check obr-5
String priority = obr.getQuantityTiming(0).getPriority().getValue();
if (priority == null)
priority = obr.getPriority().getValue();
if (priority != null)
{
orderInvVo.setOrderPriority((OrderPriority) svc.getLocalLookup(OrderPriority.class, OrderPriority.TYPE_ID, providerSystem.getCodeSystem().getText(), priority));
}
orderInvVo.setWasOrdered(Boolean.FALSE);
return orderInvVo;
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:35,代码来源:R01VoMapper.java
示例5: renderOrder
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private void renderOrder(IfOrderInvestigationVo investigation, IfOrderMessageVo msgVo, IfOutOcsOrderVo newOrder, ORC orc, OBR obr, int id) throws Exception
{
LOG.debug("O01VoMapper renderOrder: entry");
// OBR-1 Set ID � OBR (SI)
obr.getSetIDOBR().setValue(String.valueOf(id+1));
// OBR-2 Placer order number (EI) 00216
obr.getPlacerOrderNumber().getEntityIdentifier().setValue(msgVo.getPlacerOrdNum());
// OBR-3 Filler Order Number
if (msgVo.getFillerNumberIsNotNull())
{
obr.getFillerOrderNumber().getEntityIdentifier().setValue(msgVo.getFillerNumber());
}
renderInvestigationToORC_OBR(investigation, orc, obr,msgVo.getProviderSystem());
renderMsgVoToORC(msgVo, orc);
renderNewOrderToORC_OBR(msgVo.getProviderSystem(),newOrder, orc, obr);
if (orc.getDateTimeOfTransaction().getTimeOfAnEvent().getValue() == null)
renderDateTimeVoToTS(new DateTime(), orc.getDateTimeOfTransaction());
if(investigation.getInvestigationIsNotNull()
&&investigation.getInvestigation().getEventType().equals(InvEventType.TIME_SERIES)
&&investigation.getInvestigation().getPathInvDetailsIsNotNull()
&&investigation.getInvestigation().getPathInvDetails().getSpecimens().size()>0
&&investigation.getInvestigation().getPathInvDetails().getSpecimens().get(0).getTypeIsNotNull())
{
SpecimenType type = investigation.getInvestigation().getPathInvDetails().getSpecimens().get(0).getType();
SPS sps = obr.getSpecimenSource();
sps.getSpecimenSourceNameOrCode().getIdentifier().setValue(svc.getRemoteLookup(type.getId(), msgVo.getProviderSystem().getCodeSystem().getText()));
sps.getSpecimenSourceNameOrCode().getText().setValue(type.getText());
}
LOG.debug("O01VoMapper renderOrder: exit");
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:40,代码来源:O01VoMapper.java
示例6: renderOrder
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private void renderOrder(IfOrderInvestigationVo investigation, IfOrderMessageVo msgVo, IfOutOcsOrderVo newOrder, ORC orc, OBR obr, int id) throws Exception
{
LOG.debug("O01VoMapper renderOrder: entry");
// OBR-1 Set ID – OBR (SI)
obr.getSetIDOBR().setValue(String.valueOf(id+1));
// OBR-2 Placer order number (EI) 00216
obr.getPlacerOrderNumber().getEntityIdentifier().setValue(msgVo.getPlacerOrdNum());
// OBR-3 Filler Order Number
if (msgVo.getFillerNumberIsNotNull())
{
obr.getFillerOrderNumber().getEntityIdentifier().setValue(msgVo.getFillerNumber());
}
renderInvestigationToORC_OBR(investigation, orc, obr,msgVo.getProviderSystem());
renderMsgVoToORC(msgVo, orc);
renderNewOrderToORC_OBR(msgVo.getProviderSystem(),newOrder, orc, obr);
if (orc.getDateTimeOfTransaction().getTimeOfAnEvent().getValue() == null)
renderDateTimeVoToTS(new DateTime(), orc.getDateTimeOfTransaction());
if(investigation.getInvestigationIsNotNull()
&&investigation.getInvestigation().getEventType().equals(InvEventType.TIME_SERIES)
&&investigation.getInvestigation().getPathInvDetailsIsNotNull()
&&investigation.getInvestigation().getPathInvDetails().getSpecimens().size()>0
&&investigation.getInvestigation().getPathInvDetails().getSpecimens().get(0).getTypeIsNotNull())
{
SpecimenType type = investigation.getInvestigation().getPathInvDetails().getSpecimens().get(0).getType();
SPS sps = obr.getSpecimenSource();
sps.getSpecimenSourceNameOrCode().getIdentifier().setValue(svc.getRemoteLookup(type.getId(), msgVo.getProviderSystem().getCodeSystem().getText()));
sps.getSpecimenSourceNameOrCode().getText().setValue(type.getText());
}
LOG.debug("O01VoMapper renderOrder: exit");
}
开发者ID:IMS-MAXIMS,项目名称:openMAXIMS,代码行数:40,代码来源:O01VoMapper.java
示例7: test_message_to_message_obr_1
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
@Test
public void test_message_to_message_obr_1() throws Exception {
Structure expectedSegment = getExpected().getGroup("ORDER", 0).get(
OBR.class);
Structure actualSegment = getActual().getGroup("ORDER", 0)
.getGroup("ORDER_DETAIL", 0).get(OBR.class);
assertEquals(expectedSegment, actualSegment);
}
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:9,代码来源:AbstractCrisO01Test.java
示例8: shouldProcessMessage
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
public boolean shouldProcessMessage(@Body ORU_R01 r01)
throws HL7Exception
{
boolean conformsFiller = true;
boolean conformsService = true;
int resultCount = r01.getPATIENT_RESULT().getORDER_OBSERVATIONReps();
for (int i = 0; i < resultCount && conformsFiller && conformsService; i++)
{
OBR obr = r01.getPATIENT_RESULT().getORDER_OBSERVATION(i).getOBR();
conformsFiller =
this.checkFillerOrderNumberConforms(obr
.getObr3_FillerOrderNumber()
.getEi1_EntityIdentifier()
.getValue());
conformsService =
this.checkDiagnosticServiceConforms(obr
.getObr24_DiagnosticServSectID()
.getValue());
}
if (this.verify)
{
return (conformsFiller && conformsService);
}
else
{
return !(conformsFiller && conformsService);
}
}
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:34,代码来源:MicroResultsFilter.java
示例9: checkResultMessage
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private boolean checkResultMessage(AbstractMessage message) {
boolean conformsFiller = true;
ORU_R01 r01 = (ORU_R01) message;
int resultCount = r01.getPATIENT_RESULT().getORDER_OBSERVATIONReps();
for (int i = 0; i < resultCount && conformsFiller; i++)
{
OBR obr = r01.getPATIENT_RESULT().getORDER_OBSERVATION(i).getOBR();
String fillerOrderNumber = StringUtils.defaultString(obr
.getObr3_FillerOrderNumber()
.getEi1_EntityIdentifier()
.getValue());
if(fillerOrderNumber.isEmpty())
{
if(matchValue.isEmpty())
conformsFiller = true;
else
conformsFiller = false;
}
else
{
conformsFiller =
this.checkFillerOrderNumberConforms(StringUtils.defaultString(fillerOrderNumber));
}
}
return (conformsFiller);
}
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:32,代码来源:FillerOrderNumberFilter.java
示例10: checkOrderMessage
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private boolean checkOrderMessage(AbstractMessage message) {
boolean conformsFiller = true;
ORM_O01 o01 = (ORM_O01) message;
int orderCount = o01.getORDERReps();
for (int i = 0; i < orderCount && conformsFiller ; i++)
{
OBR obr = o01.getORDER(i).getORDER_DETAIL().getOBR();
String fillerOrderNumber = StringUtils.defaultString(obr
.getObr3_FillerOrderNumber()
.getEi1_EntityIdentifier()
.getValue());
if(fillerOrderNumber.isEmpty())
{
if(matchValue.isEmpty())
conformsFiller = true;
else
conformsFiller = false;
}
else
{
conformsFiller =
this.checkFillerOrderNumberConforms(StringUtils.defaultString(fillerOrderNumber));
}
}
return (conformsFiller);
}
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:33,代码来源:FillerOrderNumberFilter.java
示例11: populateWithOrderingProvider
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private void populateWithOrderingProvider(IfOcsOrderVo order, ORC orc, OBR obr, ProviderSystemVo providerSystem) throws HL7Exception
{
XCN orderingProvider=null;
if (orc.getOrderingProvider(0) != null && orc.getOrderingProvider(0).getIDNumber().getValue() != null)
{
orderingProvider = orc.getOrderingProvider(0);
}
if (orderingProvider == null)
{
//Need to also check OBR-16 Ordering provider (XCN)
if (obr.getOrderingProvider(0) != null && obr.getOrderingProvider(0).getIDNumber().getValue() != null)
{
orderingProvider = obr.getOrderingProvider(0);
}
}
if (orderingProvider != null)
{
HcpLiteVo hcp = populateHcpVoFromXCN(orderingProvider, providerSystem.getCodeSystem());
if (hcp != null)
{
order.setResponsibleClinician(hcp);
if (!order.getOrderedByIsNotNull()) // wdev-4443
order.setOrderedBy(hcp.getMos());
}
else
{
GpShortVo gp = populateGPVoFromXCN(orderingProvider, providerSystem.getCodeSystem());
if (gp == null)
{
// We need to log the fact that the GP is not on our system
LOG.warn("GP with code " + orderingProvider.getIDNumber() + " was not found on the IMS database");
}
else
{
order.setResponsibleGp(gp);
}
}
//WDEV-8884
if(ConfigFlag.HL7.REJECT_RESULTS_FOR_UNKNOWN_ORDERINGPROVIDER_OR_LOCATION.getValue())
{
// wdev-2746 If Neither Clinician nor GP are populated, reject the message as
// one or the other are mandatory
if (orderingProvider.getIDNumber().getValue() != null &&
!order.getResponsibleClinicianIsNotNull() && !order.getResponsibleGpIsNotNull())
{
throw new HL7Exception("Ordering Provider (ORC-12, OBR-16) does not map to a valid Clinician or GP - Message Rejected");
}
}
}
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:54,代码来源:R01VoMapper.java
示例12: populatePATHInvestigationVoFromOBR
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private IfOrderInvestigationVo populatePATHInvestigationVoFromOBR(OBR obr, String sendingApplication, IfOrderSpecimenVo specimen, HashMap<String, Object> fillerSpecimens, IfOrderSpecimenVoCollection specColl, ProviderSystemVo providerSystem,boolean isResultMessage) throws Exception
{
IfOrderInvestigationVo orderInvVo = new IfOrderInvestigationVo();
String providerInvCode = obr.getUniversalServiceIdentifier().getIdentifier().getValue();
// wdev-5526 - method created and called from here now
IfInvestigationLiteVo invVo = getInvestigation(obr, sendingApplication, providerSystem, providerInvCode,true,isResultMessage);
if (invVo == null)
throw new HL7Exception("Investigation not found for provider system and providerInvCode = " + providerInvCode);
fillPATHInvestigationFromOBR(orderInvVo, obr, invVo,providerSystem);
// OBR-27 Quantity/timing
// wdev-2746 - If obr-27 is not populated, we can check obr-5
String priority = obr.getQuantityTiming(0).getPriority().getValue();
if (priority == null)
priority = obr.getPriority().getValue();
if (priority != null)
{
orderInvVo.setOrderPriority((OrderPriority) svc.getLocalLookup(OrderPriority.class, OrderPriority.TYPE_ID, providerSystem.getCodeSystem().getText(), priority));
}
orderInvVo.setWasOrdered(Boolean.FALSE);
// Specimens only for Pathology orders
// OBR-3 Filler order number
// WDEV-1354
// We hold onto the specimens for each fillerOrderNumber in case
// the same specimen is required again
String fillerOrderNum = obr.getFillerOrderNumber().getEntityIdentifier().getValue();
if (fillerSpecimens.containsKey(fillerOrderNum)&&!ConfigFlag.HL7.UNSOLICTED_NEW_SPECIMEN_PER_INVESTIGATION.getValue())
specimen = (IfOrderSpecimenVo) fillerSpecimens.get(fillerOrderNum);
else
{
specimen = new IfOrderSpecimenVo();
populateSpecimenVoFromOBR(specimen, orderInvVo.getInvestigation(), obr,providerSystem);
specimen.getInvestigations();
if(InvEventType.TIME_SERIES.equals(orderInvVo.getInvestigation().getEventType()))
{
specimen.setWasProcessed(true);
// specimen.setPlacerOrdNum(value);
}
if(!specimen.getInvestigationsIsNotNull())
{
specimen.setInvestigations(new IfOrderInvestigationVoCollection());
}
specimen.getInvestigations().add(orderInvVo);
specColl.add(specimen);
if (!fillerSpecimens.containsKey(specimen.getFillerOrdNum()))
{
fillerSpecimens.put(specimen.getFillerOrdNum(), specimen);
}
}
if(orderInvVo.getSpecimen()==null&&!ConfigFlag.HL7.UNSOLICTED_NEW_SPECIMEN_PER_INVESTIGATION.getValue())
{
orderInvVo.setSpecimen(specColl);
}
else
{
orderInvVo.setSpecimen(new IfOrderSpecimenVoCollection());
orderInvVo.getSpecimen().add(specimen);
}
//WDEV-15552
SPS sps = obr.getSpecimenSource();
LookupInstVo resultSpecimenSource=svc.getLocalLookup(LookupInstVo.class, ResultSpecimenTypes.TYPE_ID, providerSystem.getCodeSystem().getText(), sps.getSpecimenSourceNameOrCode().getIdentifier().getValue().trim());
orderInvVo.setResultSpecimenType(resultSpecimenSource);
return orderInvVo;
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:72,代码来源:R01VoMapper.java
示例13: fillPATHInvestigationFromOBR
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private void fillPATHInvestigationFromOBR(IfOrderInvestigationVo invVo, OBR obr, IfInvestigationLiteVo cfgInv,ProviderSystemVo providerSystem) throws Exception
{
LOG.debug("R01VoMapper fillPATHInvestigationFromOBR: entry");
invVo.setInvestigation(cfgInv);
invVo.setFillerOrdNum(obr.getFillerOrderNumber().getEntityIdentifier().getValue());
invVo.setResultStatus((ResultStatus) svc.getLocalLookup(ResultStatus.class, ResultStatus.TYPE_ID, providerSystem.getCodeSystem().getText(), obr.getResultStatus().getValue()));
//http://jira/browse/WDEV-15552
SPS sps = obr.getSpecimenSource();
LookupInstVo resultSpecimenSource=svc.getLocalLookup(LookupInstVo.class, ResultSpecimenTypes.TYPE_ID, providerSystem.getCodeSystem().getText(), sps.getSpecimenSourceNameOrCode().getIdentifier().getValue().trim());
invVo.setResultSpecimenType(resultSpecimenSource);
//End http://jira/browse/WDEV-15552
// wdev-2746 ResultStatus must map to a valid lookup value
if (obr.getResultStatus().getValue() != null && !invVo.getResultStatusIsNotNull())
throw new HL7Exception("ResultStatus (OBR-25) does not map to a valid local lookup (ResultStatus) - Message Rejected");
if (obr.getRequestedDateTime() != null && obr.getRequestedDateTime().getTimeOfAnEvent().getValue() != null)
{
invVo.setDisplayDateTime(populateDateTimeVoFromTS(obr.getRequestedDateTime()));
invVo.setDisplayTimeSupplied( Boolean.valueOf(isTimeSupplied(obr.getRequestedDateTime())));
invVo.setDisplayFlag(OcsDisplayFlag.REQUESTED);
}
if (obr.getResultsRptStatusChngDateTime() != null && obr.getResultsRptStatusChngDateTime().getTimeOfAnEvent().getValue() != null)
{
DateTime dt = populateDateTimeVoFromTS(obr.getResultsRptStatusChngDateTime());
//JME: 20061205: Change to handle WinPath sending 189912300000 in OBR.22 instead of a null date/time
if (!dt.equals(new DateTime("189912300000")))
{
invVo.setDisplayDateTime(dt);
invVo.setRepDateTime(dt);
invVo.setResultSortDate(dt);//http://jira/browse/WDEV-18025
invVo.setRepTimeSupplied( Boolean.valueOf(isTimeSupplied(obr.getResultsRptStatusChngDateTime())));
invVo.setDisplayFlag(OcsDisplayFlag.REPORTED);
invVo.setDisplayTimeSupplied(invVo.getRepTimeSupplied());
}
}
if (obr.getSpecimenReceivedDateTime() != null && obr.getSpecimenReceivedDateTime().getTimeOfAnEvent().getValue() != null)
{
invVo.setDisplayDateTime(populateDateTimeVoFromTS(obr.getSpecimenReceivedDateTime()));
invVo.setDisplayFlag(OcsDisplayFlag.SPEC_RECVD);
invVo.setDisplayTimeSupplied( Boolean.valueOf(isTimeSupplied(obr.getSpecimenReceivedDateTime())));
// WDEV-16384 - Check if expected turnaround values configured. If they are, calculated the expected result datetime
invVo.setExpectedDateTime(ocsIfInbound.calculateExpectedDateTime(invVo.getInvestigation(), invVo.getDisplayDateTime()));
}
if (obr.getObservationDateTime() != null && obr.getObservationDateTime().getTimeOfAnEvent().getValue() != null)
{
invVo.setDisplayDateTime(populateDateTimeVoFromTS(obr.getObservationDateTime()));
invVo.setDisplayFlag(OcsDisplayFlag.SPEC_COLL);
invVo.setDisplayTimeSupplied( Boolean.valueOf(isTimeSupplied(obr.getObservationDateTime())));
}
/*
* etc investVo.setOrderPriority(); investVo.setOrdInvCurrentStatus();
*/
LOG.debug("R01VoMapper fillPATHInvestigationFromOBR: exit");
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:60,代码来源:R01VoMapper.java
示例14: fillRADInvestigationFromOBR
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private void fillRADInvestigationFromOBR(IfOrderInvestigationVo invVo, OBR obr, IfInvestigationLiteVo cfgInv,ProviderSystemVo providerSystem) throws Exception
{
LOG.debug("R01VoMapper fillRADInvestigationFromOBR: entry");
invVo.setInvestigation(cfgInv);
invVo.setFillerOrdNum(obr.getFillerOrderNumber().getEntityIdentifier().getValue());
invVo.setResultStatus((ResultStatus) svc.getLocalLookup(ResultStatus.class, ResultStatus.TYPE_ID, providerSystem.getCodeSystem().getText(), obr.getResultStatus().getValue()));
// http://jira/browse/WDEV-9727
String accession = obr.getFillerField2().getValue();
if (accession!=null && !Hl7Null.equals(accession))
{
invVo.setAccessionNumber(accession);
}
// wdev-2746 ResultStatus must map to a valid lookup value
if (obr.getResultStatus().getValue() != null && !invVo.getResultStatusIsNotNull())
throw new HL7Exception("ResultStatus (OBR-25) does not map to a valid local lookup (ResultStatus) - Message Rejected");
if (obr.getRequestedDateTime() != null && obr.getRequestedDateTime().getTimeOfAnEvent().getValue() !=null)
{
invVo.setDisplayDateTime(populateDateTimeVoFromTS(obr.getRequestedDateTime()));
invVo.setDisplayFlag(OcsDisplayFlag.REQUESTED);
invVo.setDisplayTimeSupplied( Boolean.valueOf(isTimeSupplied(obr.getRequestedDateTime())));
}
if (obr.getObservationDateTime() != null && obr.getObservationDateTime().getTimeOfAnEvent().getValue() != null)
{
invVo.setDisplayDateTime(populateDateTimeVoFromTS(obr.getObservationDateTime()));
invVo.setDisplayFlag(OcsDisplayFlag.EXAMINED);
invVo.setDisplayTimeSupplied( Boolean.valueOf(isTimeSupplied(obr.getObservationDateTime())));
// WDEV-16384 - Check if expected turnaround values configured. If they are, calculated the expected result datetime
invVo.setExpectedDateTime(ocsIfInbound.calculateExpectedDateTime(invVo.getInvestigation(), invVo.getDisplayDateTime()));
}
if (obr.getResultsRptStatusChngDateTime() != null && obr.getResultsRptStatusChngDateTime().getTimeOfAnEvent().getValue() != null)
{
invVo.setRepDateTime(populateDateTimeVoFromTS(obr.getResultsRptStatusChngDateTime()));
invVo.setResultSortDate(populateDateTimeVoFromTS(obr.getResultsRptStatusChngDateTime())); //http://jira/browse/WDEV-18025
invVo.setRepTimeSupplied( Boolean.valueOf(isTimeSupplied(obr.getResultsRptStatusChngDateTime())));
}
else
{
invVo.setRepDateTime(null);
invVo.setResultSortDate(null); //http://jira/browse/WDEV-18025
invVo.setRepTimeSupplied(Boolean.FALSE);
// invVo.setDisplayFlag(OcsDisplayFlag.REQUESTED);
// invVo.setDisplayTimeSupplied(false);
// invVo.setDisplayDateTime(populateDateTimeVoFromTS(obr.getObservationDateTime()));
}
/*
* etc investVo.setOrderPriority(); investVo.setOrdInvCurrentStatus();
*/
LOG.debug("R01VoMapper fillRADInvestigationFromOBR: exit");
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:54,代码来源:R01VoMapper.java
示例15: getPlacerNumFromMessage
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private String getPlacerNumFromMessage(Message msg,int invCount,int PIDcounter) throws HL7Exception
{
String placerOrdNum=null;
for (int j = 0; j < invCount; j++)
{
ORU_R01_ORCOBRNTECTDOBXNTEFT1CTI orc_group = null;
ORC orc = null;
ORC lastOrc = null;
OBR obr = null;
if (msg instanceof ORM_O01)
{
orc = ((ORM_O01)msg).getORM_O01_ORCOBRRQDRQ1RXOODSODTNTECTDDG1OBXNTEFT1CTIBLG(j).getORC();
obr = ((ORM_O01)msg).getORM_O01_ORCOBRRQDRQ1RXOODSODTNTECTDDG1OBXNTEFT1CTIBLG(j).getORM_O01_OBRRQDRQ1RXOODSODTNTECTDDG1OBXNTE().getOBR();
}
else if (msg instanceof OMG_O19)
{
orc = ((OMG_O19)msg).getOMG_O19_ORCOBRNTECTDDG1OBXNTEPIDPD1PV1PV2AL1ORCOBRNTECTDOBXNTEFT1CTIBLG(j).getORC();
obr = ((OMG_O19)msg).getOMG_O19_ORCOBRNTECTDDG1OBXNTEPIDPD1PV1PV2AL1ORCOBRNTECTDOBXNTEFT1CTIBLG(j).getOBR();
}
else if (msg instanceof ORU_R01)
{
orc_group = ((ORU_R01)msg).getORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTECTDOBXNTEFT1CTI(PIDcounter).getORU_R01_ORCOBRNTECTDOBXNTEFT1CTI(j);
orc = orc_group.getORC();
if (orc == null)
orc = lastOrc;
else
lastOrc = orc;
obr = orc_group.getOBR();
}
else if (msg instanceof ORR_O02)
{
orc = ((ORR_O02)msg).getORR_O02_PIDNTEORCOBRRQDRQ1RXOODSODTNTECTI().getORR_O02_ORCOBRRQDRQ1RXOODSODTNTECTI(j).getORC();
obr = ((ORR_O02)msg).getORR_O02_PIDNTEORCOBRRQDRQ1RXOODSODTNTECTI().getORR_O02_ORCOBRRQDRQ1RXOODSODTNTECTI(j).getOBR();
}
else if (msg instanceof ORG_O20)
{
orc = ((ORG_O20)msg).getORG_O20_PIDNTEORCOBRNTECTI().getORG_O20_ORCOBRNTECTI().getORC();
obr = ((ORG_O20)msg).getORG_O20_PIDNTEORCOBRNTECTI().getORG_O20_ORCOBRNTECTI().getOBR();
}
else
{
throw new HL7Exception("Invalid message type passed to R01.processResult");
}
placerOrdNum=null;
if ( orc.getPlacerOrderNumber() != null && orc.getPlacerOrderNumber().getEntityIdentifier() != null)
{
placerOrdNum = orc.getPlacerOrderNumber().getEntityIdentifier().getValue();
}
//JME: 20060627: Need to also check in OBR, in case sender is not filling ORC
if (placerOrdNum == null && obr.getPlacerOrderNumber() != null && obr.getPlacerOrderNumber().getEntityIdentifier() != null)
{
placerOrdNum = obr.getPlacerOrderNumber().getEntityIdentifier().getValue();
}
if (placerOrdNum != null && placerOrdNum.equals("#R"))
placerOrdNum=null;
if(placerOrdNum!=null)
return placerOrdNum;
}
return placerOrdNum;
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:65,代码来源:R01VoMapper.java
示例16: renderNewOrderToORC_OBR
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private void renderNewOrderToORC_OBR(ProviderSystemVo providerSystem,IfOutOcsOrderVo newOrder, ORC commonOrder, OBR obr) throws Exception
{
LOG.debug("O01VoMapper renderNewOrderToORC_OBR: entry");
// ORC-4 Placer group number (EI) 00218
commonOrder.getPlacerGroupNumber().getEntityIdentifier().setValue("" + newOrder.getID_OcsOrderSession());
if (newOrder.getOrderedByIsNotNull())
{
// ORC-10 Entered by (XCN) 00224
renderMemberOfStaffShortVoToXCN(newOrder.getOrderedBy(), commonOrder.getEnteredBy(0),providerSystem);
// ORC-13 Enterer�s location (PL) 00227
if (newOrder.getOrderedBy().getPrimaryLocationIsNotNull())
{
commonOrder.getEntererSLocation().getLocationDescription().setValue(newOrder.getOrderedBy().getPrimaryLocation().getName());
}
if (newOrder.getOrderedBy().getCommChannelsIsNotNull())
{
// ORC-14 Call back phone number (XTN) 00228
renderCommChannelVoCollectionToXTN(newOrder.getOrderedBy().getCommChannels(), commonOrder.getCallBackPhoneNumber(0));
}
}
// OBR-16 Ordering provider (XCN)
// ORC-12 Ordering provider (XCN) 00226
//http://jira/browse/WDEV-6910
ConfigPropertyVo prop= providerSystem.getConfigurationProperty(ConfigItems.UseGpAsOrderingProvider);
if (prop != null && (prop.getPropertyValueIsNotNull())&&(prop.getPropertyValue().length() > 0)
&&prop.getPropertyValue().trim().equalsIgnoreCase("TRUE"))
{
if(newOrder.getResponsibleGpIsNotNull())
{
renderGpShortVoToXCN(newOrder.getResponsibleGp(), commonOrder.getOrderingProvider(0),providerSystem);
renderGpShortVoToXCN(newOrder.getResponsibleGp(), obr.getOrderingProvider(0),providerSystem);
}
}
else if (newOrder.getResponsibleClinicianIsNotNull())
{
renderMemberOfStaffShortVoToXCN(newOrder.getResponsibleClinician().getMos(), commonOrder.getOrderingProvider(0),providerSystem);
renderMemberOfStaffShortVoToXCN(newOrder.getResponsibleClinician().getMos(), obr.getOrderingProvider(0),providerSystem);
// OBR-17 Order callback phone number
if (!ConfigFlag.GEN.SITE_USES_ORDER_BLEEP_EXT_NUMBER.getValue()
&& newOrder.getResponsibleClinician().getMosIsNotNull())
renderCommChannelVoToXTN(newOrder.getResponsibleClinician().getMos().getCommChannel(ChannelType.BLEEP), obr.getOrderCallbackPhoneNumber(0));
}
if(ConfigFlag.GEN.SITE_USES_ORDER_BLEEP_EXT_NUMBER.getValue()&&newOrder.getBleepExtNumberIsNotNull())
{
CommChannelVo bleepVo = new CommChannelVo();
bleepVo.setCommValue(newOrder.getBleepExtNumber());
bleepVo.setChannelType(ChannelType.BLEEP);
renderCommChannelVoToXTN(bleepVo, obr.getOrderCallbackPhoneNumber(0));
}
// OBR-28 Result copies to
if (newOrder.getReportToIsNotNull())
{
for (int i=0; i<newOrder.getReportTo().size(); i++)
{
obr.getResultCopiesTo(i).getFamilyName().getSurname().setValue(newOrder.getReportTo().get(i).getValue());
}
}
// OBR-30 Transportation mode
if (newOrder.getPatMobilityIsNotNull())
{
obr.getTransportationMode().setValue(svc.getRemoteLookup(newOrder.getPatMobility().getId(), providerSystem.getCodeSystem().getText()));
}
LOG.debug("O01VoMapper renderNewOrderToORC_OBR: exit");
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:80,代码来源:O01VoMapper.java
示例17: renderInvestigationToORC_OBR
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private void renderInvestigationToORC_OBR(IfOrderInvestigationVo investigation, ORC commonOrder, OBR obr,ProviderSystemVo providerSystem) throws Exception
{
LOG.debug("O01VoMapper renderInvestigationToORC_OBR: entry");
IfInvestigationLiteVo invVo = investigation.getInvestigation();
// ORC-5 Order status (ID) 00219
if (investigation.getOrdInvCurrentStatusIsNotNull() && investigation.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull())
commonOrder.getOrderStatus().setValue(svc.getRemoteLookup(investigation.getOrdInvCurrentStatus().getOrdInvStatus().getId(), providerSystem.getCodeSystem().getText()));
// ORC-9 Date/time of transaction (TS) 00223
//TODO: Not sure if this should override the sysinfo values.
//The assembler would ignore them anyway.
//WDEV-8866
if (investigation.getDisplayDateTimeIsNotNull())
renderDateTimeVoToTS(investigation.getDisplayDateTime(), commonOrder.getDateTimeOfTransaction());
else
renderDateTimeVoToTS(new DateTime(), commonOrder.getDateTimeOfTransaction());
// ORC-24 Ordering provider address (XAD) 01314
//TODO: Will leave out for now.
// if (invVo.getProviderServiceIsNotNull() && invVo.getProviderService().getLocationServiceIsNotNull() && invVo.getProviderService().getLocationService().getLocationIsNotNull())
// renderAddressVoToXAD(invVo.getProviderService().getLocationService().getLocation().getAddress(), commonOrder.getOrderingProviderAddress(0));
// OBR-4 Universal service identifier (CE) 00238
// Test Name
obr.getUniversalServiceIdentifier().getIdentifier().setValue(invVo.getProviderInvCode());
obr.getUniversalServiceIdentifier().getText().setValue(invVo.getInvestigationIndex().getName());
// Coding System
// if (invVo.getProviderServiceIsNotNull() && invVo.getProviderService().getProviderSystemIsNotNull() && invVo.getProviderService().getProviderSystem().getCodeSystemIsNotNull())
// obr.getUniversalServiceIdentifier().getNameOfCodingSystem().setValue(invVo.getProviderService().getProviderSystem().getCodeSystem().getText());
// OBR-5 Priority - OBR
// ORC-7 Quantity/timing
// OBR-27 Quantity/timing
if (investigation.getOrderPriorityIsNotNull())
{
String extPriority = svc.getRemoteLookup(investigation.getOrderPriority().getId(), providerSystem.getCodeSystem().getText());
commonOrder.getQuantityTiming(0).getPriority().setValue(extPriority);
obr.getPriority().setValue(extPriority);
obr.getQuantityTiming(0).getPriority().setValue(extPriority);
}
// OBR-31 Reason for study
if (investigation.getReasonForStudyIsNotNull())
obr.getReasonForStudy(0).getText().setValue(investigation.getReasonForStudy());
// JP 10/11/2006 WDEV-2110
ServiceShortVo service = ocsIf.getService(investigation.getInvestigation());
String extMapping = ocsIf.getServiceMapping(service,providerSystem.getCodeSystem());
obr.getDiagnosticServSectID().setValue(extMapping);
// ORC-7 Quantity/timing
// OBR-27 Quantity/timing
// wdev-2559 Moved from renderOrder method, examination required by is now at investigation level
renderDateVoToTS(investigation.getExamReqOnAfterDate(), obr.getQuantityTiming(0).getStartDateTime());
renderDateVoToTS(investigation.getExamReqOnAfterDate(), commonOrder.getQuantityTiming(0).getStartDateTime());
LOG.debug("O01VoMapper renderInvestigationToORC_OBR: exit");
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:63,代码来源:O01VoMapper.java
示例18: renderSpecimenToOBR
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
private void renderSpecimenToOBR(IfOrdSpecLiteVo specimen, OBR obr,ProviderSystemVo providerSystem) throws Exception
{
LOG.debug("O01VoMapper renderSpecimenToOBR: entry");
// OBR-7 Observation date/time (TS) 00241
renderDateTimeVoToTS(specimen.getCollDateTimePlacer(), obr.getObservationDateTime());
// OBR-8 Observation end date/time (TS)
renderDateTimeVoToTS(specimen.getCollEndDateTimePlacer(), obr.getObservationEndDateTime());
// OBR-11 Specimen action code
obr.getSpecimenActionCode().setValue(svc.getRemoteLookup(SpecimenActionCode.O.getId(), providerSystem.getCodeSystem().getText()));
// OBR-15 Specimen source (CM)
// This is build up of siteCd, siteText and the SpecimenSource lookup
SPS sps = obr.getSpecimenSource();
if (specimen.getSpecimenSourceIsNotNull())
{
sps.getSpecimenSourceNameOrCode().getIdentifier().setValue(svc.getRemoteLookup(specimen.getSpecimenSource().getId(), providerSystem.getCodeSystem().getText()));
sps.getSpecimenSourceNameOrCode().getText().setValue(specimen.getSpecimenSource().getText());
}
//Leaving open the option for certain disciplines to use coded site field.
if (specimen.getSiteCdIsNotNull())
{
String remoteLookup = svc.getRemoteLookup(specimen.getSiteCd().getId(), providerSystem.getCodeSystem().getText());
sps.getBodySite().getIdentifier().setValue(remoteLookup);
sps.getBodySite().getText().setValue(specimen.getSiteCd().getText());
//JME: 20061013: copy body site component into specimen source component even if value for specimen source available.
//http://jira/browse/WDEV-11634
String sendSiteAndSource = HL7Utils.getConfigItem(toConfigItemArray(providerSystem.getConfigItems()), ConfigItems.useSiteAndSource);
if (sendSiteAndSource == null || (sendSiteAndSource.equalsIgnoreCase("FALSE") || sendSiteAndSource.equalsIgnoreCase("NO")))
{
sps.getSpecimenSourceNameOrCode().getIdentifier().setValue(remoteLookup);
sps.getSpecimenSourceNameOrCode().getText().setValue(specimen.getSiteCd().getText());
}
}
// OBR-24 Diagnostic serv sect ID
if (specimen.getDisciplineIsNotNull())
{
String extMapping = ocsIf.getServiceMapping(specimen.getDiscipline(), providerSystem.getCodeSystem());
obr.getDiagnosticServSectID().setValue(extMapping);
}
// OBR-39 Collector�s comment (CE)
obr.getCollectorSComment(0).getText().setValue(specimen.getCollectorComment());
LOG.debug("O01VoMapper renderSpecimenToOBR: exit");
}
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:53,代码来源:O01VoMapper.java
示例19: PopulateOrderMessage
import ca.uhn.hl7v2.model.v24.segment.OBR; //导入依赖的package包/类
public ORR_O02 PopulateOrderMessage(ORR_O02 order, IfOrderInvestigationVo invVo,
IfOutOcsOrderVo newOrder, DomainInterface domObj)
throws DataTypeException, HL7Exception {
PID pid=order.getORR_O02_PIDNTEORCOBRRQDRQ1RXOODSODTNTECTI().getORR_O02_PIDNTE().getPID();
ORC orc = order.getORR_O02_PIDNTEORCOBRRQDRQ1RXOODSODTNTECTI().getORR_O02_ORCOBRRQDRQ1RXOODSODTNTECTI().getORC();
// If it is an NA message just send back the numbers
if(orc.getOrderControl().getValue().equals("NA") )
return order;
//Get the OBR if there is one already in the order but don't create one
// the status change messages should not contain any obrs
OBR obr = null;
if(0!= order.getORR_O02_PIDNTEORCOBRRQDRQ1RXOODSODTNTECTI().getORR_O02_ORCOBRRQDRQ1RXOODSODTNTECTI().getAll("OBR").length)
obr = order.getORR_O02_PIDNTEORCOBRRQDRQ1RXOODSODTNTECTI().getORR_O02_ORCOBRRQDRQ1RXOODSODTNTECTI().getOBR();
IFCATSExternalEventVo catsEventVo = null;
if(domObj instanceof ExternalEvents)
{
ExternalEvents eventObject = (ExternalEvents)domObj;
//If it is a new order then we don't bother with the appointment status
if(orc.getOrderControl().getValue().equals("NW") )
catsEventVo=eventObject.getCATSIFValues( invVo,false );
else
catsEventVo=eventObject.getCATSIFValues( invVo,true );
if(null== catsEventVo)
throw new HL7Exception("No appointment details found for schedula
|
请发表评论