當前位置: 首頁>>代碼示例>>Java>>正文


Java OBR類代碼示例

本文整理匯總了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;
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:23,代碼來源:EaapsMessageSupport.java

示例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;
}
 
開發者ID:oscarservice,項目名稱:oscar-old,代碼行數:14,代碼來源:AlphaHL7Handler.java

示例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);
				}
			}
		}
	}
 
開發者ID:oscarservice,項目名稱:oscar-old,代碼行數:45,代碼來源:AlphaHL7Handler.java

示例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;
}
 
開發者ID:elexis,項目名稱:elexis-3-core,代碼行數:52,代碼來源:HL7ReaderV22.java


注:本文中的ca.uhn.hl7v2.model.v22.segment.OBR類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。