package com.fs.hospital580.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 问诊题目请求
 */
@Data
@ApiModel("问诊答案对象")
public class AnswerDataVo {
    @ApiModelProperty("固定 1,2,3,4,5")
    private Integer subjectId;
    @ApiModelProperty("题目:1-症状(列表接口获取)，2-居民用药信息选择，3-是否使用过此类药物?，4-是否有药物过敏史?，5-肝肾功能是否有异常?")
    private String title;
    @ApiModelProperty("题目答案多个诊断用逗号分隔")
    private String answer;
    @ApiModelProperty("题目为2才传 问诊用药信息选择medicineId为药品id number为数量 [{\"medicineId\":\"1\",\"number\":1},{\"medicineId\":\"2\",\"number\":2}]")
    private String answerMedicine;

    public void setTitle() {
        switch (subjectId) {
            case 1:
                this.title = "症状";
                break;
            case 2:
                this.title = "用药信息";
                break;
            case 3:
                this.title = "是否使用过此类药物";
                break;
            case 4:
                this.title = "药物过敏史";
                break;
            case 5:
                this.title = "肝肾功能异常";
                break;
            default:
                this.title = "";
        }
    }
}
