当前位置: 首页>>代码示例>>Java>>正文


Java OBR类代码示例

本文整理汇总了Java中ca.uhn.hl7v2.model.v24.segment.OBR的典型用法代码示例。如果您正苦于以下问题:Java OBR类的具体用法?Java OBR怎么用?Java OBR使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OBR类属于ca.uhn.hl7v2.model.v24.segment包,在下文中一共展示了OBR类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的ca.uhn.hl7v2.model.v24.segment.OBR类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。