本文整理汇总了Java中ca.uhn.hl7v2.model.v24.segment.OBR.getPlacerOrderNumber方法的典型用法代码示例。如果您正苦于以下问题:Java OBR.getPlacerOrderNumber方法的具体用法?Java OBR.getPlacerOrderNumber怎么用?Java OBR.getPlacerOrderNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca.uhn.hl7v2.model.v24.segment.OBR
的用法示例。
在下文中一共展示了OBR.getPlacerOrderNumber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}