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


Java CE類代碼示例

本文整理匯總了Java中ca.uhn.hl7v2.model.v23.datatype.CE的典型用法代碼示例。如果您正苦於以下問題:Java CE類的具體用法?Java CE怎麽用?Java CE使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CE類屬於ca.uhn.hl7v2.model.v23.datatype包,在下文中一共展示了CE類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getGroup

import ca.uhn.hl7v2.model.v23.datatype.CE; //導入依賴的package包/類
private String getGroup(String code, CE ce){
	if (HL7_ORU_R01.CODINGSYSTEM_DORNER_GROUP_CODE.equalsIgnoreCase(code)) {
		if (ce.getCe2_Text() != null) {
			return ce.getCe2_Text().getValue();
		}
	}
	return "";
}
 
開發者ID:elexis,項目名稱:elexis-3-core,代碼行數:9,代碼來源:HL7ReaderV23.java

示例2: getSequence

import ca.uhn.hl7v2.model.v23.datatype.CE; //導入依賴的package包/類
private String getSequence(String code, CE ce){
	if (HL7_ORU_R01.CODINGSYSTEM_DORNER_GROUP_POSITION.equalsIgnoreCase(code)) {
		if (ce.getCe1_Identifier() != null) {
			return ce.getCe1_Identifier().getValue();
		}
	}
	return "";
}
 
開發者ID:elexis,項目名稱:elexis-3-core,代碼行數:9,代碼來源:HL7ReaderV23.java

示例3: readObservation

import ca.uhn.hl7v2.model.v23.datatype.CE; //導入依賴的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.getRESPONSE().getORDER_OBSERVATIONReps();
		for (int idx = 0; idx < obsCount; idx++) {
			OBR obr = oru.getRESPONSE().getORDER_OBSERVATION(idx).getOBR();
			String obrObservationDateTime =
				obr.getObr7_ObservationDateTime().getTs1_TimeOfAnEvent().getValue();
			if (obrObservationDateTime == null || obrObservationDateTime.length() < 8) {
				obrObservationDateTime =
					HL7Helper.dateToString(observation.getDateTimeOfMessage());
			}
			
			setOrderComment(oru, idx, obrObservationDateTime);
			
			for (int i = 0; i < oru.getRESPONSE().getORDER_OBSERVATION(idx)
				.getOBSERVATIONReps(); i++) {
				ORU_R01_ORDER_OBSERVATION obs = oru.getRESPONSE().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.getObr4_UniversalServiceIdentifier();
					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,代碼行數:55,代碼來源:HL7ReaderV23.java

示例4: readOBXResults

import ca.uhn.hl7v2.model.v23.datatype.CE; //導入依賴的package包/類
private void readOBXResults(ORU_R01_OBSERVATION obs, String commentNTE, String group,
	String sequence, String defaultDateTime) throws ParseException{
	OBX obx = obs.getOBX();
	String valueType = obx.getObx2_ValueType().getValue();
	String name = "";
	String itemCode = "";
	String unit = "";
	String range = "";
	String observationTime = "";
	String status = "";
	Boolean flag;
	
	if (valueType.equals(HL7Constants.OBX_VALUE_TYPE_ED)) {
		String observationId =
			obx.getObx3_ObservationIdentifier().getCwe1_Identifier().getValue();
		
		if (!"DOCUMENT".equals(observationId)) {
			logger.warn(MessageFormat.format(
				Messages.getString("HL7_ORU_R01.Error_WrongObsIdentifier"), observationId));
		}
		
		ED ed = (ED) obx.getObx5_ObservationValue(0).getData();
		String filename = ed.getEd3_DataSubtype().getValue();
		String encoding = ed.getEd4_Encoding().getValue();
		String data = ed.getEd5_Data().getValue();
		sequence = obx.getSetIDOBX().getValue();
		observationTime = obx.getObx14_DateTimeOfTheObservation().getValue();
		observation.add(new EncapsulatedData(filename, encoding, data, observationTime,
			commentNTE, group, sequence));
	} else if (isTextOrNumeric(valueType)) {
		name = determineName(obx);
		String value = "";
		Object tmp = obx.getObx5_ObservationValue(0).getData();
		
		if (tmp instanceof ST) {
			value = ((ST) tmp).getValue();
		} else if (tmp instanceof TX) {
			value = ((TX) tmp).getValue();
			if (value.contains("\\.br")) {
				value = parseTextValue(value);
			}
		} else if (tmp instanceof FT) {
			value = parseFormattedTextValue(((FT) tmp).getValue());
		} else if (tmp instanceof NM) {
			value = ((NM) tmp).getValue();
		} else if (tmp instanceof SN) {
			value = ((SN) tmp).getSn2_Num1().getValue();
		} else if (tmp instanceof CE) {
			value = ((CE) tmp).getCe2_Text().getValue();
		}
		
		itemCode = obx.getObx3_ObservationIdentifier().getCwe1_Identifier().getValue();
		unit = obx.getObx6_Units().getCwe1_Identifier().getValue();
		range = obx.getObx7_ReferencesRange().getValue();
		flag = isPathologic(obx.getObx8_AbnormalFlags(0).getValue());
		observationTime = obx.getObx14_DateTimeOfTheObservation().getValue();
		status = obx.getObx11_ObservationResultStatus().getValue();
		
		LabResultData lrd =
			new LabResultData(itemCode, name, unit, value, range, flag, defaultDateTime,
				observationTime, commentNTE, group, sequence, status,
				extractName(obx.getObx4_ObservationSubID()));
		
		if (valueType.equals(HL7Constants.OBX_VALUE_TYPE_NM)
			|| valueType.equals(HL7Constants.OBX_VALUE_TYPE_SN)) {
			lrd.setIsNumeric(true);
		} else if (valueType.equals(HL7Constants.OBX_VALUE_TYPE_TX)) {
			lrd.setIsPlainText(true);
		} else if (valueType.equals(HL7Constants.OBX_VALUE_TYPE_FT)) {
			lrd.setIsFormatedText(true);
		}
		
		observation.add(lrd);
	} else {
		logger.error(MessageFormat.format("Value type {0} is not implemented!", valueType));
	}
}
 
開發者ID:elexis,項目名稱:elexis-3-core,代碼行數:78,代碼來源:HL7ReaderV26.java


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