本文整理汇总了Java中ca.uhn.hl7v2.model.v22.segment.OBR类的典型用法代码示例。如果您正苦于以下问题:Java OBR类的具体用法?Java OBR怎么用?Java OBR使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OBR类属于ca.uhn.hl7v2.model.v22.segment包,在下文中一共展示了OBR类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOrderingProvider
import ca.uhn.hl7v2.model.v22.segment.OBR; //导入依赖的package包/类
public String getOrderingProvider() {
ORU_R01_PATIENT_RESULT patientResult = message.getPATIENT_RESULT();
if (patientResult == null) {
return null;
}
ORU_R01_ORDER_OBSERVATION orderObservation = patientResult.getORDER_OBSERVATION();
if (orderObservation == null) {
return null;
}
OBR obr = orderObservation.getOBR();
if (obr == null) {
return null;
}
CN orderingProvider = obr.getOrderingProvider();
if (orderingProvider == null) {
return null;
}
if (orderingProvider.getIDNumber() != null) {
return orderingProvider.getIDNumber().getValue();
}
return null;
}
示例2: getOBXFinalResultCount
import ca.uhn.hl7v2.model.v22.segment.OBR; //导入依赖的package包/类
public int getOBXFinalResultCount() {
// not applicable to alpha labs
int count = 0;
for (int i = 0; i < obrSegKeySet.size(); i++) {
OBR obr = obrSegKeySet.get(i);
for (int j = 0; j < obrSegMap.get(obr).size(); j++){
if ("F".equalsIgnoreCase(obrSegMap.get(obr).get(j).getObservationResultStatus().getValue())) {
count++;
}
}
}
return count;
}
示例3: init
import ca.uhn.hl7v2.model.v22.segment.OBR; //导入依赖的package包/类
public void init(String hl7Body) throws HL7Exception {
Parser p = new PipeParser();
p.setValidationContext(new NoValidation());
msg = (ORU_R01) p.parse(hl7Body.replaceAll("\n", "\r\n"));
ArrayList<String> labs = getMatchingAlphaLabs(hl7Body);
headers = new ArrayList<String>();
obrSegMap = new LinkedHashMap<OBR, ArrayList<OBX>>();
obrSegKeySet = new ArrayList<OBR>();
for (int i = 0; i < labs.size(); i++) {
msg = (ORU_R01) p.parse((labs.get(i)).replaceAll("\n", "\r\n"));
int obrCount = msg.getPATIENT_RESULT().getORDER_OBSERVATIONReps();
for (int j = 0; j < obrCount; j++) {
// ADD OBR SEGMENTS AND THEIR OBX SEGMENTS TO THE OBRSEGMAP
OBR obrSeg = msg.getPATIENT_RESULT().getORDER_OBSERVATION(j)
.getOBR();
ArrayList<OBX> obxSegs = obrSegMap.get(obrSeg);
// if the obrsegment has not yet been created it will be now
if (obxSegs == null)
obxSegs = new ArrayList<OBX>();
int obxCount = msg.getPATIENT_RESULT().getORDER_OBSERVATION(j)
.getOBSERVATIONReps();
for (int k = 0; k < obxCount; k++) {
obxSegs.add(msg.getPATIENT_RESULT().getORDER_OBSERVATION(j)
.getOBSERVATION(k).getOBX());
}
obrSegMap.put(obrSeg, obxSegs);
obrSegKeySet.add(obrSeg);
// ADD THE HEADER TO THE HEADERS ARRAYLIST
String header = getString(Terser.get(obrSeg, 4, 0, 2, 1));
if (!headers.contains(header)) {
headers.add(header);
}
}
}
}
示例4: readObservation
import ca.uhn.hl7v2.model.v22.segment.OBR; //导入依赖的package包/类
@Override
public ObservationMessage readObservation(HL7PatientResolver patientResolver,
boolean createIfNotFound) throws ElexisException{
observation = null;
ORU_R01 oru = (ORU_R01) message;
try {
this.patientResolver = patientResolver;
setPatient(oru, createIfNotFound);
int obsCount = oru.getPATIENT_RESULT().getORDER_OBSERVATIONReps();
for (int idx = 0; idx < obsCount; idx++) {
OBR obr = oru.getPATIENT_RESULT().getORDER_OBSERVATION(idx).getOBR();
String obrObservationDateTime =
obr.getObr7_ObservationDateTime().getTs1_TimeOfAnEvent().getValue();
setOrderComment(oru, idx, obrObservationDateTime);
for (int i = 0; i < oru.getPATIENT_RESULT().getORDER_OBSERVATION(idx)
.getOBSERVATIONReps(); i++) {
ORU_R01_ORDER_OBSERVATION obs =
oru.getPATIENT_RESULT().getORDER_OBSERVATION(idx);
// get notes and comments
String commentNTE = getComments(obs, i);
// groupe and sequence
String group = "";
String sequence = "";
for (int k = 0; k < 2; k++) {
CE ce = obr.getUniversalServiceID();
if (ce != null) {
String code = "";
if (ce.getCe3_NameOfCodingSystem() != null)
code = ce.getCe3_NameOfCodingSystem().getValue();
group = getGroup(code, ce);
sequence = getSequence(code, ce);
}
}
// result
readOBXResults(obs.getOBSERVATION(i), commentNTE, group, sequence,
obrObservationDateTime);
}
}
} catch (HL7Exception | ParseException e) {
throw new ElexisException(e.getMessage(), e);
}
return observation;
}