Java 类ims.emergency.vo.TriageForTriageProtocolAssessmentVo 实例源码

项目:AvoinApotti    文件:TriageProtocolAssessmentImpl.java   
public TriageForTriageProtocolAssessmentVo getTriage(TriageRefVo triage)
{
    if (triage == null || triage.getID_Triage() == null)
        return null;

    return TriageForTriageProtocolAssessmentVoAssembler.create((Triage) getDomainFactory().getDomainObject(Triage.class, triage.getID_Triage()));
}
项目:AvoinApotti    文件:TriageProtocolAssessmentImpl.java   
public void saveTriageWithAssessment(TriageForTriageProtocolAssessmentVo triage, TriageProtocolAssessmentVo triageProtocol) throws StaleObjectException
{
    if (triage == null)
        throw new CodingRuntimeException("Triage record to save is null.");

    if (!triage.isValidated())
        throw new CodingRuntimeException("Triage record is not validated.");

    if (triage.getCurrentTriageAssessmentIsNotNull())
    {
        if (Boolean.TRUE.equals(triage.getCurrentTriageAssessment().getIsMain()) && triage.getCurrentTriagePathway() == null)
        {
            PatientRefVo patient = triage.getCurrentTriageAssessment().getPatient();
            CareContextRefVo careContext = triage.getCurrentTriageAssessment().getAttendance();
            HcpLiteVo hcp = triage.getCurrentTriageAssessment().getAssessmentNurse();

            triage.setCurrentTriagePathway(createSavePatientICP(triage.getCurrentTriageAssessment().getPatientProblem().getProblem(), patient, careContext, hcp));
        }
    }

    Triage domainTriage = TriageForTriageProtocolAssessmentVoAssembler.extractTriage(getDomainFactory(), triage);

    if (triageProtocol != null)
    {
        TriageProtocolAssessment domainTriageProtocol = TriageProtocolAssessmentVoAssembler.extractTriageProtocolAssessment(getDomainFactory(), triageProtocol);

        getDomainFactory().save(domainTriageProtocol);
    }

    getDomainFactory().save(domainTriage);
}
项目:openMAXIMS    文件:Logic.java   
public boolean save() throws ims.framework.exceptions.PresentationLogicException
{
    try
    {
        if (form.getLocalContext().getTriage() == null)
            throw new CodingRuntimeException("Triage must be selected");

        TriageForTriageProtocolAssessmentVo triage = (TriageForTriageProtocolAssessmentVo) form.getLocalContext().getTriage().clone();

        // Get on screen values
        TriageProtocolAssessmentVo originalRecord = form.getLocalContext().getTriageProtocolAssessment();

        TriageProtocolAssessmentVo protocolAssessment = null;
        if (originalRecord == null || TriageAssessmentAction.RETRIAGE.equals(form.getLocalContext().getTriageAssessmentAction()))
            protocolAssessment = populateDataFromScreen(null);
        else
            protocolAssessment = populateDataFromScreen((TriageProtocolAssessmentVo) originalRecord.clone());


        if (TriageAssessmentAction.ADD.equals(form.getLocalContext().getTriageAssessmentAction()))
        {
            return saveTriageAssessment(triage, originalRecord, protocolAssessment);
        }
        else if (TriageAssessmentAction.EDIT.equals(form.getLocalContext().getTriageAssessmentAction()))
        {
            return saveTriageAssessment(triage, originalRecord, protocolAssessment);
        }
        else if (TriageAssessmentAction.RETRIAGE.equals(form.getLocalContext().getTriageAssessmentAction()))
        {
            return saveTriageAssessment(triage, originalRecord, protocolAssessment);
        }
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        engine.close(DialogResult.CANCEL);
        return false;
    }
    return false;
}
项目:openMAXIMS    文件:TriageProtocolAssessmentImpl.java   
public TriageForTriageProtocolAssessmentVo getTriage(TriageRefVo triage)
{
    if (triage == null || triage.getID_Triage() == null)
        return null;

    return TriageForTriageProtocolAssessmentVoAssembler.create((Triage) getDomainFactory().getDomainObject(Triage.class, triage.getID_Triage()));
}
项目:openMAXIMS    文件:TriageProtocolAssessmentImpl.java   
public void saveTriageWithAssessment(TriageForTriageProtocolAssessmentVo triage, TriageProtocolAssessmentVo triageProtocol) throws StaleObjectException
{
    if (triage == null)
        throw new CodingRuntimeException("Triage record to save is null.");

    if (!triage.isValidated())
        throw new CodingRuntimeException("Triage record is not validated.");

    if (triage.getCurrentTriageAssessmentIsNotNull())
    {
        if (Boolean.TRUE.equals(triage.getCurrentTriageAssessment().getIsMain()) && triage.getCurrentTriagePathway() == null)
        {
            PatientRefVo patient = triage.getCurrentTriageAssessment().getPatient();
            CareContextRefVo careContext = triage.getCurrentTriageAssessment().getAttendance();
            HcpLiteVo hcp = triage.getCurrentTriageAssessment().getAssessmentNurse();

            triage.setCurrentTriagePathway(createSavePatientICP(triage.getCurrentTriageAssessment().getPatientProblem().getProblem(), patient, careContext, hcp));
        }
    }

    Triage domainTriage = TriageForTriageProtocolAssessmentVoAssembler.extractTriage(getDomainFactory(), triage);

    if (triageProtocol != null)
    {
        TriageProtocolAssessment domainTriageProtocol = TriageProtocolAssessmentVoAssembler.extractTriageProtocolAssessment(getDomainFactory(), triageProtocol);

        getDomainFactory().save(domainTriageProtocol);
    }

    getDomainFactory().save(domainTriage);
}
项目:openMAXIMS    文件:TriageProtocolAssessmentImpl.java   
public TriageForTriageProtocolAssessmentVo getTriage(TriageRefVo triage)
{
    if (triage == null || triage.getID_Triage() == null)
        return null;

    return TriageForTriageProtocolAssessmentVoAssembler.create((Triage) getDomainFactory().getDomainObject(Triage.class, triage.getID_Triage()));
}
项目:openMAXIMS    文件:TriageProtocolAssessmentImpl.java   
public void saveTriageWithAssessment(TriageForTriageProtocolAssessmentVo triage, TriageProtocolAssessmentVo triageProtocol) throws StaleObjectException
{
    if (triage == null)
        throw new CodingRuntimeException("Triage record to save is null.");

    if (!triage.isValidated())
        throw new CodingRuntimeException("Triage record is not validated.");

    if (triage.getCurrentTriageAssessmentIsNotNull())
    {
        if (Boolean.TRUE.equals(triage.getCurrentTriageAssessment().getIsMain()) && triage.getCurrentTriagePathway() == null)
        {
            PatientRefVo patient = triage.getCurrentTriageAssessment().getPatient();
            CareContextRefVo careContext = triage.getCurrentTriageAssessment().getAttendance();
            HcpLiteVo hcp = triage.getCurrentTriageAssessment().getAssessmentNurse();

            triage.setCurrentTriagePathway(createSavePatientICP(triage.getCurrentTriageAssessment().getPatientProblem().getProblem(), patient, careContext, hcp));
        }
    }

    Triage domainTriage = TriageForTriageProtocolAssessmentVoAssembler.extractTriage(getDomainFactory(), triage);

    if (triageProtocol != null)
    {
        TriageProtocolAssessment domainTriageProtocol = TriageProtocolAssessmentVoAssembler.extractTriageProtocolAssessment(getDomainFactory(), triageProtocol);

        getDomainFactory().save(domainTriageProtocol);
    }

    getDomainFactory().save(domainTriage);
}
项目:openmaxims-linux    文件:TriageProtocolAssessmentImpl.java   
public TriageForTriageProtocolAssessmentVo getTriage(TriageRefVo triage)
{
    if (triage == null || triage.getID_Triage() == null)
        return null;

    return TriageForTriageProtocolAssessmentVoAssembler.create((Triage) getDomainFactory().getDomainObject(Triage.class, triage.getID_Triage()));
}
项目:openmaxims-linux    文件:TriageProtocolAssessmentImpl.java   
public void saveTriageWithAssessment(TriageForTriageProtocolAssessmentVo triage, TriageProtocolAssessmentVo triageProtocol) throws StaleObjectException
{
    if (triage == null)
        throw new CodingRuntimeException("Triage record to save is null.");

    if (!triage.isValidated())
        throw new CodingRuntimeException("Triage record is not validated.");

    if (triage.getCurrentTriageAssessmentIsNotNull())
    {
        if (Boolean.TRUE.equals(triage.getCurrentTriageAssessment().getIsMain()) && triage.getCurrentTriagePathway() == null)
        {
            PatientRefVo patient = triage.getCurrentTriageAssessment().getPatient();
            CareContextRefVo careContext = triage.getCurrentTriageAssessment().getAttendance();
            HcpLiteVo hcp = triage.getCurrentTriageAssessment().getAssessmentNurse();

            triage.setCurrentTriagePathway(createSavePatientICP(triage.getCurrentTriageAssessment().getPatientProblem().getProblem(), patient, careContext, hcp));
        }
    }

    Triage domainTriage = TriageForTriageProtocolAssessmentVoAssembler.extractTriage(getDomainFactory(), triage);

    if (triageProtocol != null)
    {
        TriageProtocolAssessment domainTriageProtocol = TriageProtocolAssessmentVoAssembler.extractTriageProtocolAssessment(getDomainFactory(), triageProtocol);

        getDomainFactory().save(domainTriageProtocol);
    }

    getDomainFactory().save(domainTriage);
}