本文整理汇总了Java中ca.uhn.hl7v2.model.v24.datatype.ST类的典型用法代码示例。如果您正苦于以下问题:Java ST类的具体用法?Java ST怎么用?Java ST使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ST类属于ca.uhn.hl7v2.model.v24.datatype包,在下文中一共展示了ST类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testCamelRoute
import ca.uhn.hl7v2.model.v24.datatype.ST; //导入依赖的package包/类
@Test
public void testCamelRoute() {
StringBuilder in = new StringBuilder();
in.append(LINE_ONE);
in.append("\r");
in.append(LINE_TWO);
String result = processMessage.sendInOut(in).getContent(String.class);;
PipeParser pipeParser = new PipeParser();
try {
//parse the message string into a Message object
Message message = pipeParser.parse(result);
if (message instanceof QRY_A19) {
QRD qrd = (QRD) message.get("QRD");
ST st = qrd.getQueryID();
Assert.assertTrue(st.getValue().equals("GetPatient"));
} else {
Assert.fail("Message not instance of QRY_A19");
}
} catch (Exception e) {
Assert.fail(e.getMessage());
}
}
示例2: extractOrc
import ca.uhn.hl7v2.model.v24.datatype.ST; //导入依赖的package包/类
private OrcMessage extractOrc(ORC orc) throws HL7Exception{
if (orc != null) {
OrcMessage orcMessage = new OrcMessage();
XCN[] ops = orc.getOrderingProvider();
for (XCN op : ops) {
FN fn = op.getFamilyName();
ST familyName = null;
if (fn != null) {
familyName = fn.getSurname();
if (familyName == null) {
familyName = fn.getOwnSurname();
}
}
addNameValuesToOrcMessage(op.getGivenName(), familyName, orcMessage);
}
return orcMessage;
}
return null;
}
示例3: transform
import ca.uhn.hl7v2.model.v24.datatype.ST; //导入依赖的package包/类
private void transform(PV1 pv1, Segment zref, EVN evn)
throws HL7Exception
{
pv1.getPv12_PatientClass().setValue("I");
for (int i = 6; i < 9; i++)
pv1.getField(i, 0).clear();
pv1
.getPv19_ConsultingDoctor(0)
.getXcn1_IDNumber()
.setValue(zref.getField(7, 0).encode().split("\\^")[0]);
pv1.getPv110_HospitalService().setValue(
zref.getField(9, 0).encode().split("\\^")[0]);
pv1.getPv122_CourtesyCode().setValue("NSP");
pv1.getPv128_InterestCode().setValue("NSP");
zref.getField(2, 0).parse(
pv1.getPv144_AdmitDateTime().getTs1_TimeOfAnEvent().getValue());
pv1
.getPv144_AdmitDateTime()
.getTs1_TimeOfAnEvent()
.setValueToSecond(
evn
.getEvn2_RecordedDateTime()
.getTimeOfAnEvent()
.getValueAsCalendar());
pv1.getPv150_AlternateVisitID().clear();
zref.getField(5, 0).parse(zref.getField(5, 0).encode() + "^^DGATE");
zref.getField(8, 0).parse(zref.getField(9, 0).encode());
zref.getField(11, 0).parse("R^^DGATE");
((Varies) zref.getField(12, 0)).setData(new ST(zref.getMessage()));
zref.getField(12, 0).clear();
}
示例4: insertEncodingCharactersToMSH
import ca.uhn.hl7v2.model.v24.datatype.ST; //导入依赖的package包/类
private static void insertEncodingCharactersToMSH(MSH msh)
throws HL7Exception {
ST encodingChars = msh.getEncodingCharacters();
encodingChars.setValue("^~\\,");
}
示例5: transform
import ca.uhn.hl7v2.model.v24.datatype.ST; //导入依赖的package包/类
public void transform(PV1 pv1, Segment zref, EVN evn)
throws HL7Exception
{
ADT_A01 a01 = new ADT_A01();
MSH mshSegment = a01.getMSH();
mshSegment.getFieldSeparator().setValue("|");
mshSegment.getEncodingCharacters().setValue("^~\\&");
PV1 tempPv1 = a01.getPV1();
ca.uhn.hl7v2.util.DeepCopy.copy(pv1, tempPv1);
pv1.clear();
pv1.getPv11_SetIDPV1().setValue(tempPv1.getPv11_SetIDPV1().encode());
pv1.getPv14_AdmissionType().setValue(
tempPv1.getPv14_AdmissionType().encode());
pv1.getPv110_HospitalService().setValue(
zref.getField(9, 0).encode().toString());
pv1.getPv114_AdmitSource().setValue(
tempPv1.getPv114_AdmitSource().encode());
pv1.getPv19_ConsultingDoctor(0).parse(
zref.getField(7, 0).encode().toString().replace("^^DGATE", ""));
pv1.getPv12_PatientClass().setValue("I");
String dischargeLocation =
tempPv1.getPv137_DischargedToLocation().encode();
pv1.getPv18_ReferringDoctor(0).parse(
tempPv1.getPv19_ConsultingDoctor(0).encode());
pv1.getPv13_AssignedPatientLocation().parse(
dischargeLocation.split("\\^")[0] + "^^^KCH^^^^^" +
dischargeLocation.split("\\^")[1]);
pv1.getPv117_AdmittingDoctor(0).parse(
tempPv1.getPv117_AdmittingDoctor(0).encode());
pv1.getPv118_PatientType().parse(
tempPv1.getPv118_PatientType().encode());
pv1.getPv119_VisitNumber().parse(
tempPv1.getPv119_VisitNumber().encode());
pv1.getPv122_CourtesyCode().setValue("NSP");
pv1.getPv128_InterestCode().parse(
tempPv1.getPv128_InterestCode().encode());
pv1.getPv128_InterestCode().setValue("NSP");
pv1.getPv140_BedStatus().setValue("NSP");
pv1.getPv144_AdmitDateTime().parse(
tempPv1.getPv145_DischargeDateTime(0).encode());
CE ce = new CE(zref.getMessage());
((Varies) zref.getField(1, 0)).setData(ce);
ce.getCe1_Identifier().setValue("EMERG");
ce.getCe3_NameOfCodingSystem().setValue("DGATE");
zref.getField(2, 0).parse(
tempPv1.getPv144_AdmitDateTime().getTs1_TimeOfAnEvent().getValue());
zref.getField(5, 0).parse(zref.getField(5, 0).encode() + "^^DGATE");
zref.getField(8, 0).parse(zref.getField(9, 0).encode());
zref.getField(9, 0).parse(zref.getField(9, 0).encode() + "^^DGATE");
zref.getField(11, 0).parse("R^^DGATE");
((Varies) zref.getField(12, 0)).setData(new ST(zref.getMessage()));
zref.getField(12, 0).clear();
}