当前位置: 首页>>代码示例>>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;未经允许,请勿转载。