本文整理汇总了Java中ca.uhn.hl7v2.model.v24.segment.PID类的典型用法代码示例。如果您正苦于以下问题:Java PID类的具体用法?Java PID怎么用?Java PID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PID类属于ca.uhn.hl7v2.model.v24.segment包,在下文中一共展示了PID类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createADT01Message
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
private static Message createADT01Message(String msgId) throws Exception {
ADT_A01 adt = new ADT_A01();
// Populate the MSH Segment
MSH mshSegment = adt.getMSH();
mshSegment.getFieldSeparator().setValue("|");
mshSegment.getEncodingCharacters().setValue("^~\\&");
mshSegment.getDateTimeOfMessage().getTimeOfAnEvent().setValue("200701011539");
mshSegment.getSendingApplication().getNamespaceID().setValue("MYSENDER");
mshSegment.getSequenceNumber().setValue("123");
mshSegment.getMessageType().getMessageType().setValue("ADT");
mshSegment.getMessageType().getTriggerEvent().setValue("A01");
// Populate the PID Segment
PID pid = adt.getPID();
pid.getPatientName(0).getFamilyName().getSurname().setValue("Doe");
pid.getPatientName(0).getGivenName().setValue("John");
pid.getPatientIdentifierList(0).getID().setValue(msgId);
return adt;
}
示例2: createADT01Message
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
private static Message createADT01Message(String msgId) throws Exception {
ADT_A01 adt = new ADT_A01();
// Populate the MSH Segment
MSH mshSegment = adt.getMSH();
mshSegment.getFieldSeparator().setValue("|");
mshSegment.getEncodingCharacters().setValue("^~\\&");
mshSegment.getDateTimeOfMessage().getTimeOfAnEvent().setValue("200701011539");
mshSegment.getSendingApplication().getNamespaceID().setValue("MYSENDER");
mshSegment.getSequenceNumber().setValue("123");
mshSegment.getMessageType().getMessageType().setValue("ADT");
mshSegment.getMessageType().getTriggerEvent().setValue("A01");
mshSegment.getCharacterSet(0).setValue("UNICODE UTF-8");
// Populate the PID Segment
PID pid = adt.getPID();
pid.getPatientName(0).getFamilyName().getSurname().setValue("Döe");
pid.getPatientName(0).getGivenName().setValue("John");
pid.getPatientIdentifierList(0).getID().setValue(msgId);
return adt;
}
示例3: translate
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
public ImsNasMsg translate(Message msg) throws Exception
{
//WDEV-5010
if (conn == null)
{
throw new Exception("Cannot operate without connection to NAS Server.");
}
//A40 is part of group ADT_A39 where PID and MRG segments repeat, so
//they can't be accessed generically (e.g. PID pid = (PID) msg.get(SegName.PID);)
MRG mrg = ((ADT_A39)msg).getADT_A39_PIDPD1MRGPV1().getMRG();
PID pid = ((ADT_A39)msg).getADT_A39_PIDPD1MRGPV1().getPID();
//EVN
EVN evn = (EVN) msg.get(SegName.EVN);
/* field 1 */
if (!evn.getEventTypeCode().getValue().equalsIgnoreCase("A40"))
{
throw new HL7Exception("Unexpected Event Type Code for this message type");
}
return doMerge(mrg,msg,pid);
}
示例4: renderPatientVoToPID
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
protected final void renderPatientVoToPID(Patient patVo, PID pid, ProviderSystemVo providerSystem) throws Exception
{
LOG.debug("VoMapper renderPatientVoToPID: entry");
if (patVo == null)
return;
renderPatientShortVoToPID(patVo, pid, providerSystem);
for (int i = 0; i < patVo.getOtherNames().size(); i++)
{
renderNameVoToXPN(patVo.getOtherNames().get(i), pid.getPatientName(i+1),providerSystem);
}
for (int i = 0; i < patVo.getAddresses().size(); i++)
{
if (!patVo.getAddressIsNotNull()) // First instance will not have been populated if permanent address was null
renderAddressVoToXAD(patVo.getAddresses().get(i), pid.getPatientAddress(i),providerSystem);
else
renderAddressVoToXAD(patVo.getAddresses().get(i), pid.getPatientAddress(i+1),providerSystem);
}
if (patVo.getMaritalStatusIsNotNull())
pid.getMaritalStatus().getIdentifier().setValue(svc.getRemoteLookup(patVo.getMaritalStatus().getID(), providerSystem.getCodeSystem().getText()));
LOG.debug("VoMapper renderPatientVoToPID: exit (" + pid.toString() + ")");
}
示例5: transform
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
public void transform(PID pid) throws HL7Exception {
if (StringUtils.isNotEmpty(pid.getPatientID().getID().getValue())) {
pid.getPatientID().getIdentifierTypeCode().setValue("NHS");
}
pid.getPatientIdentifierList(0).getAssigningAuthority().clear();
pid.getPatientIdentifierList(0).getIdentifierTypeCode().setValue("PAS");
pid.getPatientName(0)
.getPrefixEgDR()
.setValue(
StringUtils.capitalize(StringUtils.lowerCase(pid
.getPatientName(0).getPrefixEgDR().getValue())));
int contextId = this.configurationService
.findContextIdByName(SYM_PIMS_SEX);
String sex = this.configurationService.findValue(contextId, StringUtils
.defaultString(pid.getAdministrativeSex().getValue()));
pid.getAdministrativeSex().setValue(sex);
}
示例6: transform
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
/**
* This method for translating PID segment in A08 message from SYM to PIMS.
*/
public void transform(PID pid)
throws HL7Exception
{
pid.getPid2_PatientID().getCx5_IdentifierTypeCode().setValue("NHS");
pid
.getPid3_PatientIdentifierList(0)
.getCx5_IdentifierTypeCode()
.setValue("PAS");
pid
.getPatientName(0)
.getXpn5_PrefixEgDR()
.setValue(
StringUtils.upperCase(pid
.getPatientName(0)
.getXpn5_PrefixEgDR()
.getValue()));
pid.getPid16_MaritalStatus().getCe1_Identifier().setValue("NSP");
pid.getPid17_Religion().getCe1_Identifier().setValue("NSP");
pid.getPid22_EthnicGroup(0).getCe1_Identifier().setValue("NSP");
pid.getPid24_MultipleBirthIndicator().setValue("NSP");
}
示例7: createADT01Message
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
private static Message createADT01Message() throws Exception {
ADT_A01 adt = new ADT_A01();
adt.initQuickstart("ADT", "A01", "P");
// Populate the PID Segment
PID pid = adt.getPID();
pid.getPatientName(0).getFamilyName().getSurname().setValue("Doe");
pid.getPatientName(0).getGivenName().setValue("John");
pid.getPatientIdentifierList(0).getID().setValue(PATIENT_ID);
return adt;
}
示例8: createADT01Message
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
private static Message createADT01Message() throws Exception {
ADT_A01 adt = new ADT_A01();
adt.initQuickstart("ADT", "A01", "P");
// Populate the PID Segment
PID pid = adt.getPID();
pid.getPatientName(0).getFamilyName().getSurname().setValue("Doe");
pid.getPatientName(0).getGivenName().setValue("John");
pid.getPhoneNumberBusiness(0).getPhoneNumber().setValue("333123456");
pid.getPatientIdentifierList(0).getID().setValue("123456");
return adt;
}
示例9: createADT01Message
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
private static ADT_A01 createADT01Message() throws Exception {
ADT_A01 adt = new ADT_A01();
adt.initQuickstart("ADT", "A01", "P");
// Populate the PID Segment
PID pid = adt.getPID();
pid.getPatientName(0).getFamilyName().getSurname().setValue("Doe");
pid.getPatientName(0).getGivenName().setValue("John");
pid.getPatientIdentifierList(0).getID().setValue("123456");
return adt;
}
示例10: createADT01Message
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
private static Message createADT01Message() throws Exception {
ADT_A01 adt = new ADT_A01();
adt.initQuickstart("ADT", "A01", "P");
// Populate the PID Segment
PID pid = adt.getPID();
pid.getPatientName(0).getFamilyName().getSurname().setValue("Doe");
pid.getPatientName(0).getGivenName().setValue("John");
pid.getPatientIdentifierList(0).getID().setValue("123456");
return adt;
}
示例11: getPatientPkey
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
public final Integer getPatientPkey(Message msg) throws Exception
{
if (msg == null) throw new Exception("Null message passed to getPatientPkey");
PID pid = (PID) msg.get("PID");
return getPatientPkey(pid);
}
示例12: getPatientHospNum
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
public final Integer getPatientHospNum(Message msg) throws Exception
{
if (msg == null) throw new Exception("Null message passed to getPatientPkey");
PID pid = (PID) msg.get("PID");
return getPatientHospNum(pid);
}
示例13: renderMaximsIdentifier
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
protected final void renderMaximsIdentifier(Integer ID,PID pid,ProviderSystemVo providerSystem)throws Exception
{
if(null==ID||null==pid||null==providerSystem)
return;
int identiferCount=pid.getPatientIdentifierList().length;
CX maximsID=pid.getPatientIdentifierList(identiferCount);
maximsID.getID().setValue(ID.toString());
if (providerSystem.getIdtypeComponent().intValue() == 4)
maximsID.getAssigningAuthority().getNamespaceID().setValue("MAXIMS");
else
maximsID.getIdentifierTypeCode().setValue("MAXIMS");
}
示例14: renderPatientVoToPID
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
protected final void renderPatientVoToPID(Patient patVo, PID pid, ProviderSystemVo providerSystem) throws Exception
{
LOG.debug("VoMapper renderPatientVoToPID: entry");
if (patVo == null)
return;
renderPatientShortVoToPID(patVo, pid, providerSystem);
for (int i = 0; i < patVo.getOtherNames().size(); i++)
{
renderNameVoToXPN(patVo.getOtherNames().get(i), pid.getPatientName(i+1),providerSystem);
}
//http://jira/browse/WDEV-20335
if((patVo.getIsConfidential() == null) || (patVo.getIsConfidentialIsNotNull() && !patVo.getIsConfidential()))
{
for (int i = 0; i < patVo.getAddresses().size(); i++)
{
if (!patVo.getAddressIsNotNull()) // First instance will not have been populated if permanent address was null
renderAddressVoToXAD(patVo.getAddresses().get(i), pid.getPatientAddress(i),providerSystem);
else
renderAddressVoToXAD(patVo.getAddresses().get(i), pid.getPatientAddress(i+1),providerSystem);
}
} //WDEV-20335
if (patVo.getMaritalStatusIsNotNull())
pid.getMaritalStatus().getIdentifier().setValue(svc.getRemoteLookup(patVo.getMaritalStatus().getID(), providerSystem.getCodeSystem().getText()));
LOG.debug("VoMapper renderPatientVoToPID: exit (" + pid.toString() + ")");
}
示例15: getValueFromMessage
import ca.uhn.hl7v2.model.v24.segment.PID; //导入依赖的package包/类
@Override
protected String getValueFromMessage(AbstractMessage message)
throws HL7Exception
{
PID pid = HapiUtil.getWithTerser(message, PID.class);
return pid.getPid8_AdministrativeSex().getValue();
}