• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java PV1类的典型用法和代码示例

java 1次浏览

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

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

示例1: translate

点赞 3

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
public ImsNasMsg translate(Message msg) throws Exception 
{
	if (conn == null) 
	{
		throw new Exception("Cannot operate without connection to NAS Server.");
	}
	
	PV1 pv1 = (PV1) msg.get(SegName.PV1);
	String tmpVal = pv1.getPatientClass().getValue(); 
	if (tmpVal != null && tmpVal.equalsIgnoreCase("O"))
	{
		NasMapper mapper = HL7NasApplication.getNasMapper("A05");
		if (mapper == null)
		{
			throw new Exception("A04 mapper requires A05 mapper. A05 mapper not found in list of registerd mappers.");			
		}
		mapper.setConnection(conn);
		return mapper.translate(msg);
	}
	else return null; //will just pos ack.

}
 

开发者ID:oopcell,
项目名称:AvoinApotti,
代码行数:23,
代码来源:A04NasMapper.java

示例2: processPatientUpdate

点赞 3

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
protected Message processPatientUpdate(Message msg, ProviderSystemVo providerSystem, boolean includeNok) throws HL7Exception
{
	try
	{
		Patient patVo = savePatient(msg, providerSystem, includeNok);
		PV1 pv1 = (PV1) msg.get("PV1");
		if (ConfigFlag.HL7.INSTANTIATE_EPISODE_FROM_ADT.getValue())
		{
			createCareSpell(patVo, pv1,providerSystem);
		}
	}
	catch (Exception ex)
	{
		ex.printStackTrace();
		return HL7Utils.buildRejAck( msg.get("MSH"), "Exception. " + ex.getMessage(), HL7Errors.APP_INT_ERROR, toConfigItemArray(providerSystem.getConfigItems()));
	}
	

	Message ack = HL7Utils.buildPosAck( msg.get("MSH"), toConfigItemArray(providerSystem.getConfigItems()));
	return ack;
}
 

开发者ID:oopcell,
项目名称:AvoinApotti,
代码行数:22,
代码来源:A28VoMapper.java

示例3: getCareContextFromPV1

点赞 3

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
public CareContextRefVo getCareContextFromPV1(PV1 pv) throws DataTypeException
{
	String visitId=pv.getVisitNumber().getID().getValue() + "_" + pv.getVisitNumber().getComponent(1);
	String pasEpisodeId = pv.getAlternateVisitID().getID().getValue();
	CareContextInterfaceVo careContext;
	
	if (pasEpisodeId!=null)
	{
		careContext=careSpellDialog.getCareContextFromPasEpisodeId(pasEpisodeId,visitId);
		if (careContext!=null)
		{
			if (careContext.getEpisodeOfCare()!=null)
			{
				setCareContextContext(careContext.getID_CareContext(),careContext.getEpisodeOfCare().getID_EpisodeOfCare());
				return (CareContextRefVo)careContext;
			}
		}
	}	
	return null;
}
 

开发者ID:oopcell,
项目名称:AvoinApotti,
代码行数:21,
代码来源:A03VoMapper.java

示例4: getReferringConsultant

点赞 3

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
protected MedicRefVo getReferringConsultant(PV1 pv1, ProviderSystemVo providerSystem) //WDEV-20278
	{
		MedicRefVo hcp=null;
		XCN[] xcns = pv1.getReferringDoctor();
		if (xcns!=null&&xcns.length>0&&xcns[0]!=null)
		{
			hcp= populateMedicRefFromXCN(xcns[0],TaxonomyType.NAT_CONS_CODE);
		}
		if(hcp==null&&xcns.length>1&&xcns[1]!=null)
		{
			//WDEV-20278
//			hcp=populateMedicRefFromXCN(xcns[1],TaxonomyType.PAS);
			hcp = populateMedicRefFromXCN(xcns[1], providerSystem.getCodeSystem()); //WDEV-20278
		}
		return hcp;
	}
 

开发者ID:IMS-MAXIMS,
项目名称:openMAXIMS,
代码行数:17,
代码来源:VoMapper.java

示例5: getAttendingDoctor

点赞 3

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
protected HcpMinVo getAttendingDoctor(PV1 pv1, ProviderSystemVo providerSystem) //WDEV-20278
	{
		HcpMinVo hcp=null;
		XCN[] xcns = pv1.getAttendingDoctor();
		if (xcns!=null&&xcns.length>0&&xcns[0]!=null)
		{
			hcp= populateHcpMinFromXCN(xcns[0],TaxonomyType.NAT_CONS_CODE);
		}
		if(hcp==null&&xcns.length>1&&xcns[1]!=null)
		{
			//WDEV-20278
//			hcp=populateHcpMinFromXCN(xcns[1],TaxonomyType.PAS);
			hcp = populateHcpMinFromXCN(xcns[1], providerSystem.getCodeSystem()); //WDEV-20278
		}
		return hcp;
	}
 

开发者ID:IMS-MAXIMS,
项目名称:openMAXIMS,
代码行数:17,
代码来源:VoMapper.java

示例6: shouldProcessMessage

点赞 3

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
public boolean shouldProcessMessage(@Body AbstractMessage body)
    throws HL7Exception
{
    PV1 pv1 = HapiUtil.get(body, PV1.class);
    String patientLocation = 
     StringUtils.defaultString(pv1
 			.getAssignedPatientLocation()
 			.getPointOfCare()
 			.getValue());

    if (patientLocation.startsWith("CDU"))
    {
    	return false;
    }
    else
    {
    	return true;
    }

}
 

开发者ID:KingsCollegeHospital,
项目名称:rassyeyanie,
代码行数:21,
代码来源:NotCDUVisitFilter.java

示例7: isPatientClassValid

点赞 2

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
protected int isPatientClassValid(Message msg,StringBuffer classVal) throws Exception
{
	/*  
	 *  The A05's produced by these conversations all seem to have PV1.2 values like 
	 *  "PREADMIT" if it's an IP or OP pre-registration or "WAITLIST" if it's an OP 
	 *  referral or IP Waiting list addition 
	 * */
	
	// if current inp or outp records exists - return and do nothing (unless msg/event
	// is to specifically manipulate a current encounter)
	PV1 pv1 = (PV1) msg.get(SegName.PV1);
	
	classVal.append(pv1.getPatientClass().getValue());
	if (classVal.toString() == null || classVal.toString().length() == 0)
	{
		return INVALID_CLASS;
	}
	else if(classVal.toString().equalsIgnoreCase("E")) // Emergency
		return INPATIENT;
	else if(classVal.toString().equalsIgnoreCase("I")) // Inpatient
		return INPATIENT;
	else if(classVal.toString().equalsIgnoreCase("O")) // Outpatient
		return OUTPATIENT;
	else if(classVal.toString().equalsIgnoreCase("P")) // Pre-admit (Inpatient and Outpatient)
		return EITHER;
	else if(classVal.toString().equalsIgnoreCase("R")) // Recurring (Inpatient and Outpatient)
		return EITHER;
	else if(classVal.toString().equalsIgnoreCase("B")) // Obstetrics
		return EITHER;
	else if(classVal.toString().equalsIgnoreCase("W")) // Waitlist
		return WAITLIST;
	else if(classVal.toString().equalsIgnoreCase("N")) // 
		return INPATIENT;		
	else
		return INVALID_CLASS;
	
}
 

开发者ID:oopcell,
项目名称:AvoinApotti,
代码行数:38,
代码来源:NasMapper.java

示例8: getVisitNumberFromPV1

点赞 2

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
protected String getVisitNumberFromPV1(PV1 pv1) throws Exception
{
	String tmpVal = "";
	//if patient type is NEWBRON use a visit number of 0 (as a visit number will not be supplied)
	/* field 18 */
	
	if (pv1.getPatientType() != null && pv1.getPatientType().getValue() != null && pv1.getPatientType().getValue().equals("NEWBORN"))
	{
		return "0";
	}else
	{
		/* field 19 */
		tmpVal = pv1.getVisitNumber().getIdentifierTypeCode().getValue();
		if (tmpVal == null || !tmpVal.equalsIgnoreCase("VISITID"))
			throw new HL7Exception("PV1.19 - Visit must have identifier of type VISITID");
		
		tmpVal = pv1.getVisitNumber().getID().getValue();
		if (tmpVal == null || tmpVal.equals(""))
			throw new HL7Exception("PV1.19 - Visit Identifier is a mandatory field");
		
		try
		{
			return tmpVal;
			
		}catch (NumberFormatException nfe)
		{
			throw new HL7Exception("PV1.19 - Visit Identifier must be a valid integer value");
		}
	}		
}
 

开发者ID:oopcell,
项目名称:AvoinApotti,
代码行数:31,
代码来源:NasMapper.java

示例9: getReferringConsultant

点赞 2

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
protected MedicRefVo getReferringConsultant(PV1 pv1)
{
	MedicRefVo hcp=null;
	XCN[] xcns = pv1.getReferringDoctor();
	if (xcns!=null&&xcns.length>0&&xcns[0]!=null)
	{
		hcp= populateMedicRefFromXCN(xcns[0],TaxonomyType.NAT_CONS_CODE);
	}
	if(hcp==null&&xcns.length>1&&xcns[1]!=null)
	{
		hcp=populateMedicRefFromXCN(xcns[1],TaxonomyType.PAS);
	}
	return hcp;
}
 

开发者ID:oopcell,
项目名称:AvoinApotti,
代码行数:15,
代码来源:VoMapper.java

示例10: getAttendingDoctor

点赞 2

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
protected HcpMinVo getAttendingDoctor(PV1 pv1)
{
	HcpMinVo hcp=null;
	XCN[] xcns = pv1.getAttendingDoctor();
	if (xcns!=null&&xcns.length>0&&xcns[0]!=null)
	{
		hcp= populateHcpMinFromXCN(xcns[0],TaxonomyType.NAT_CONS_CODE);
	}
	if(hcp==null&&xcns.length>1&&xcns[1]!=null)
	{
		hcp=populateHcpMinFromXCN(xcns[1],TaxonomyType.PAS);
	}
	return hcp;
}
 

开发者ID:oopcell,
项目名称:AvoinApotti,
代码行数:15,
代码来源:VoMapper.java

示例11: processPatientLeave

点赞 2

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
protected Message processPatientLeave(Message msg, ProviderSystemVo providerSystem) throws HL7Exception
{
	try
	{
		
		PatientShort patVo = (PatientShort)getPrimaryIdFromPid(msg, providerSystem);
		
		if (patVo != null)
		{
			patVo = getDemog().getPatient(patVo);
			
			if (patVo == null)
				return HL7Utils.buildRejAck(msg.get("MSH"), "This patient has not been registered within the system", HL7Errors.APP_INT_ERROR, toConfigItemArray(providerSystem.getConfigItems()));

			String eventCode = HL7Utils.getEventCode(msg);
			if (eventCode.equals("A21") || eventCode.equals("A53"))  // A21 set's patient on leave, A53 cancels the cancelled Patient Leave i.e. sets them on leave again
				adt.recordInpatientLeave(patVo);
			else if (eventCode.equals("A22") || eventCode.equals("A52"))  // Cancel Patient's Leave
			{
				PV1 pv1 = (PV1) msg.get("PV1");
				LocShortVo loc = null;
				loc = orgLoc.getLocationByTaxonomyType(pv1.getAssignedPatientLocation().getPointOfCare().getValue(), TaxonomyType.PAS);
				patVo.setWard(loc);
				adt.cancelInpatientLeave(patVo);  // A22
			}
		}
	}
	catch (StaleObjectException ex)
	{
		return HL7Utils.buildRejAck( msg.get("MSH"), "StaleObjectException occured recording Inpatient Leave - " + ex.getMessage(), HL7Errors.APP_INT_ERROR, toConfigItemArray(providerSystem.getConfigItems()));
	}

	Message ack = HL7Utils.buildPosAck( msg.get("MSH"), toConfigItemArray(providerSystem.getConfigItems()));
	return ack;
}
 

开发者ID:oopcell,
项目名称:AvoinApotti,
代码行数:36,
代码来源:A21VoMapper.java

示例12: updateOrderLevelValues

点赞 2

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的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

示例13: isGPResultMessage

点赞 2

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
private boolean isGPResultMessage(Message msg)
{
	PV1 pv1=null;
	if (msg!=null&&msg instanceof ORU_R01)
	{
		pv1=((ORU_R01)msg).getORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTECTDOBXNTEFT1CTI().getORU_R01_PIDPD1NK1NTEPV1PV2().getORU_R01_PV1PV2().getPV1();
	}
	//WDEV-13253 
	if (pv1 != null&&pv1.getPatientClass()!=null&&pv1.getPatientClass().getValue()!=null&&pv1.getPatientClass().getValue().equals("G"))
		{
			return true;
		}
	return false;
}
 

开发者ID:oopcell,
项目名称:AvoinApotti,
代码行数:15,
代码来源:R01VoMapper.java

示例14: processPatientUpdate

点赞 2

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
protected EventResponse processPatientUpdate(Message msg, ProviderSystemVo providerSystem, boolean includeNok) throws HL7Exception //WDEV-20112
	{
		//WDEV-20112
		EventResponse response = new EventResponse(); //WDEV-20112
		
		try
		{
			Patient patVo = savePatient(msg, providerSystem, includeNok);
			
			//WDEV-20112
			response.setPatient(patVo); //WDEV-20112
			
			PV1 pv1 = (PV1) msg.get("PV1");
			if (ConfigFlag.HL7.INSTANTIATE_EPISODE_FROM_ADT.getValue())
			{
				createCareSpell(patVo, pv1,providerSystem);
			}
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
			//WDEV-20112
//			return HL7Utils.buildRejAck( msg.get("MSH"), "Exception. " + ex.getMessage(), HL7Errors.APP_INT_ERROR, toConfigItemArray(providerSystem.getConfigItems()));
			response.setMessage(HL7Utils.buildRejAck(msg.get("MSH"), "Exception: " + ex.getMessage(), HL7Errors.APP_INT_ERROR, toConfigItemArray(providerSystem.getConfigItems())));
			return response; //WDEV-20112
		}
		
		//WDEV-20112
//		Message ack = HL7Utils.buildPosAck( msg.get("MSH"), toConfigItemArray(providerSystem.getConfigItems()));
//		return ack;
		response.setMessage(HL7Utils.buildPosAck( msg.get("MSH"), toConfigItemArray(providerSystem.getConfigItems())));
		return response; //WDEV-20112
	}
 

开发者ID:IMS-MAXIMS,
项目名称:openMAXIMS,
代码行数:34,
代码来源:A28VoMapper.java

示例15: populateMessage

点赞 2

import ca.uhn.hl7v2.model.v24.segment.PV1; //导入依赖的package包/类
public Message populateMessage(IHL7OutboundMessageHandler event)  throws Exception
	{
		LOG.debug("A25VoMapper populateMessage: entry");
		
		ADT_A21 message = new ADT_A21();
		PV1 pv1 = message.getPV1();
		PV2 pv2 = message.getPV2();
		Patient patient=null;
	
		if(event instanceof InpatientEpisodeQueueVo)
		{
			a01Vomapper = (A01VoMapper)HL7EngineApplication.getVoMapper(EvnCodes.A01);
			if(a01Vomapper==null)
			{
				throw new HL7Exception("A25 mapper requires A01 mapper. A01 mapper not found in list of registered mappers.");			
			}

			InpatientEpisodeQueueVo feedVo = (InpatientEpisodeQueueVo)event;
			ifInpatientEpisodeVo inpatientEpisode = adt.getInpatientEpisodeDetails(feedVo);
			patient = inpatientEpisode.getPatient();
			a01Vomapper.populateBasicEpisodeData(event, inpatientEpisode, pv1, pv2);	
		}
		
		populateMSH(event.getProviderSystem(), message.getMSH(), Long.toString( new java.util.Date().getTime()), "ADT", "A25");
		message.getEVN().getEventTypeCode().setValue("A25");
		
		if(patient != null)
		{
			renderPatientVoToPID(patient, message.getPID(), event.getProviderSystem());
			PD1 pd1 = message.getPD1();
			//WDEV-20993
//			renderGPDetailsToPD1(patient, pd1);
			renderGPDetailsToPD1(patient, pd1, event.getProviderSystem());
			renderPatientDetailsToPD1(patient, pd1, event.getProviderSystem()); //WDEV-22624
		}
	
		return message;
		
	}
 

开发者ID:IMS-MAXIMS,
项目名称:openMAXIMS,
代码行数:40,
代码来源:A25VoMapper.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)