package com.lantone.qc.kernel.catalogue.threelevelward;

import com.lantone.qc.kernel.catalogue.QCCatalogue;
import com.lantone.qc.pub.model.InputInfo;
import com.lantone.qc.pub.model.OutputInfo;
import com.lantone.qc.pub.model.doc.ward.DirectorDoctorWardDoc;
import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName : THR0139
 * @Description : 上级医师（副主任医师/主任医师）首次查房无补充诊断/初步诊断/修正诊断
 * @Author : 胡敬
 * @Date: 2020-03-23 14:16
 */
@Component
public class THR0139 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        if (inputInfo.getThreeLevelWardDocs().size() == 0) {
            status.set("0");
            return;
        }
        List<DirectorDoctorWardDoc> directorDocs = inputInfo.getThreeLevelWardDocs().get(0).getDirectorDoctorWardDocs();
        if (directorDocs.size() == 0) {
            status.set("0");
            return;
        }
        DirectorDoctorWardDoc firstDirectDoc = directorDocs.get(0);
        ThreeLevelWardLabel firstDirectLabel = firstDirectDoc.getThreeLevelWardLabel();
        if (firstDirectLabel == null) {
            return;
        }

        if (firstDirectLabel.getDiags().size() != 0) {
            status.set("0");
        }
    }
}