|
|
package com.supervision.vo.manage;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.crypto.digest.MD5;
|
|
|
import com.supervision.model.DiseasePhysical;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
@Data
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
|
public class DiseasePhysicalResVo extends DiseasePhysical {
|
|
|
|
|
|
@ApiModelProperty("工具名称")
|
|
|
private String toolName;
|
|
|
|
|
|
@ApiModelProperty("工具类型")
|
|
|
private String toolType;
|
|
|
|
|
|
@ApiModelProperty("工具父级id")
|
|
|
private String toolParentId;
|
|
|
|
|
|
@ApiModelProperty("身体部位名称")
|
|
|
private String locationName;
|
|
|
|
|
|
@ApiModelProperty("工具id路径")
|
|
|
private List<String> toolIdPath;
|
|
|
|
|
|
@ApiModelProperty("身体部位id路径")
|
|
|
private List<String> locationIdPath;
|
|
|
|
|
|
@ApiModelProperty("诊断依据 0:初步诊断依据 1:证实诊断依据 2:鉴别诊断依据 3:全面诊断依据")
|
|
|
private List<Integer> diagnosticCriteria;
|
|
|
|
|
|
/**
|
|
|
* 聚合诊断依据 通过 primarilyDiagnosisCriteriaFlag basisConfirmFlag basisIdentificationFlag fullCheckFlag
|
|
|
* 属性值设置 诊断依据的值
|
|
|
*/
|
|
|
public void aggregationDiagnosticCriteria(){
|
|
|
|
|
|
if (null == diagnosticCriteria){
|
|
|
diagnosticCriteria = new ArrayList<>();
|
|
|
}
|
|
|
|
|
|
if (Integer.valueOf(1).equals(super.getPrimarilyDiagnosisCriteriaFlag())){
|
|
|
diagnosticCriteria.add(0);
|
|
|
}
|
|
|
|
|
|
if (Integer.valueOf(1).equals(super.getBasisConfirmFlag())){
|
|
|
diagnosticCriteria.add(1);
|
|
|
}
|
|
|
|
|
|
if (Integer.valueOf(1).equals(super.getBasisIdentificationFlag())){
|
|
|
diagnosticCriteria.add(2);
|
|
|
}
|
|
|
|
|
|
if (Integer.valueOf(1).equals(super.getFullCheckFlag())){
|
|
|
diagnosticCriteria.add(3);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
public void initToolIdPath(){
|
|
|
if (null == toolIdPath){
|
|
|
toolIdPath = new ArrayList<>();
|
|
|
}
|
|
|
toolIdPath.add(new MD5().digestHex16(toolType));
|
|
|
toolIdPath.add(getToolId());
|
|
|
}
|
|
|
|
|
|
public void initLocationIdPath(){
|
|
|
if (null == locationIdPath){
|
|
|
locationIdPath = new ArrayList<>();
|
|
|
}
|
|
|
if (StrUtil.isNotEmpty(getToolParentId())){
|
|
|
locationIdPath.add(getToolParentId());
|
|
|
}
|
|
|
if (StrUtil.isNotEmpty(getLocationId())){
|
|
|
locationIdPath.add(getLocationId());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void populateOther(){
|
|
|
this.aggregationDiagnosticCriteria();
|
|
|
this.initToolIdPath();
|
|
|
this.initLocationIdPath();
|
|
|
}
|
|
|
|
|
|
}
|