Java 类ims.emergency.vo.domain.ClinicianNoteDefaultTextConfigVoAssembler 实例源码

项目:AvoinApotti    文件:AttendanceClinicalNoteDialogImpl.java   
public ClinicianNoteDefaultTextConfigVo getDefaultClinicianNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default clinician note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultClinicianNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {clinicalProblemRef.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultClinicianNoteList == null || defaultClinicianNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create((ClinicianNoteDefaultTextConfig) defaultClinicianNoteList.get(0));
}
项目:AvoinApotti    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo saveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave) throws StaleObjectException
{
    if (clinicianNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null ClinicianNote");

    if (!clinicianNoteToSave.isValidated())
        throw new DomainRuntimeException("ClinicianNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = ClinicianNoteDefaultTextConfigVoAssembler.extractClinicianNoteDefaultTextConfig(factory, clinicianNoteToSave);

    factory.save(domainClinicianNote);

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:AvoinApotti    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVoCollection listClinicianNotes(ClinicalProblemVo presentingProblem, LookupInstVo status)
{
    DomainFactory factory = getDomainFactory();

    String hql = " select cn from ClinicianNoteDefaultTextConfig as cn ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    if (presentingProblem != null)
    {
        condStr.append(andStr + " where cn.problem.id = :cName");
        markers.add("cName");
        values.add(presentingProblem.getID_ClinicalProblem());
        andStr = " and ";
    }
    else
        andStr = " where ";

    if (status != null)
    {
        condStr.append(andStr + " cn.status.id = :cStatus");
        markers.add("cStatus");
        values.add(status.getID());
    }

    condStr.append(" order by UPPER(cn.problem.pCName) asc");

    hql += condStr.toString();
    return ClinicianNoteDefaultTextConfigVoAssembler.createClinicianNoteDefaultTextConfigVoCollectionFromClinicianNoteDefaultTextConfig(factory.find(hql, markers, values));
}
项目:AvoinApotti    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo getClinicianNote(ClinicianNoteDefaultTextConfigRefVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicianNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:AvoinApotti    文件:MedicNoteDialogImpl.java   
public ims.emergency.vo.ClinicianNoteDefaultTextConfigVo getDefaultTriageNote(ims.clinical.configuration.vo.ClinicalProblemRefVo problem)
{
    if(problem == null || problem.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default medic note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultMedicNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {problem.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultMedicNoteList == null || defaultMedicNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create( (ClinicianNoteDefaultTextConfig) defaultMedicNoteList.get(0));
}
项目:openMAXIMS    文件:AttendanceClinicalNoteDialogImpl.java   
public ClinicianNoteDefaultTextConfigVo getDefaultClinicianNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default clinician note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultClinicianNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {clinicalProblemRef.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultClinicianNoteList == null || defaultClinicianNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create((ClinicianNoteDefaultTextConfig) defaultClinicianNoteList.get(0));
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo saveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave) throws StaleObjectException
{
    if (clinicianNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null ClinicianNote");

    if (!clinicianNoteToSave.isValidated())
        throw new DomainRuntimeException("ClinicianNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = ClinicianNoteDefaultTextConfigVoAssembler.extractClinicianNoteDefaultTextConfig(factory, clinicianNoteToSave);

    factory.save(domainClinicianNote);

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVoCollection listClinicianNotes(ClinicalProblemVo presentingProblem, LookupInstVo status)
{
    DomainFactory factory = getDomainFactory();

    String hql = " select cn from ClinicianNoteDefaultTextConfig as cn ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    if (presentingProblem != null)
    {
        condStr.append(andStr + " where cn.problem.id = :cName");
        markers.add("cName");
        values.add(presentingProblem.getID_ClinicalProblem());
        andStr = " and ";
    }
    else
        andStr = " where ";

    if (status != null)
    {
        condStr.append(andStr + " cn.status.id = :cStatus");
        markers.add("cStatus");
        values.add(status.getID());
    }

    condStr.append(" order by UPPER(cn.problem.pCName) asc");

    hql += condStr.toString();
    return ClinicianNoteDefaultTextConfigVoAssembler.createClinicianNoteDefaultTextConfigVoCollectionFromClinicianNoteDefaultTextConfig(factory.find(hql, markers, values));
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo getClinicianNote(ClinicianNoteDefaultTextConfigRefVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicianNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openMAXIMS    文件:MedicNoteDialogImpl.java   
public ims.emergency.vo.ClinicianNoteDefaultTextConfigVo getDefaultTriageNote(ims.clinical.configuration.vo.ClinicalProblemRefVo problem)
{
    if(problem == null || problem.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default medic note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultMedicNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {problem.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultMedicNoteList == null || defaultMedicNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create( (ClinicianNoteDefaultTextConfig) defaultMedicNoteList.get(0));
}
项目:openMAXIMS    文件:AttendanceClinicalNoteDialogImpl.java   
public ClinicianNoteDefaultTextConfigVo getDefaultClinicianNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default clinician note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultClinicianNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {clinicalProblemRef.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultClinicianNoteList == null || defaultClinicianNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create((ClinicianNoteDefaultTextConfig) defaultClinicianNoteList.get(0));
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo saveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave) throws StaleObjectException
{
    if (clinicianNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null ClinicianNote");

    if (!clinicianNoteToSave.isValidated())
        throw new DomainRuntimeException("ClinicianNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = ClinicianNoteDefaultTextConfigVoAssembler.extractClinicianNoteDefaultTextConfig(factory, clinicianNoteToSave);

    factory.save(domainClinicianNote);

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVoCollection listClinicianNotes(ClinicalProblemVo presentingProblem, LookupInstVo status)
{
    DomainFactory factory = getDomainFactory();

    String hql = " select cn from ClinicianNoteDefaultTextConfig as cn ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    if (presentingProblem != null)
    {
        condStr.append(andStr + " where cn.problem.id = :cName");
        markers.add("cName");
        values.add(presentingProblem.getID_ClinicalProblem());
        andStr = " and ";
    }
    else
        andStr = " where ";

    if (status != null)
    {
        condStr.append(andStr + " cn.status.id = :cStatus");
        markers.add("cStatus");
        values.add(status.getID());
    }

    condStr.append(" order by UPPER(cn.problem.pCName) asc");

    hql += condStr.toString();
    return ClinicianNoteDefaultTextConfigVoAssembler.createClinicianNoteDefaultTextConfigVoCollectionFromClinicianNoteDefaultTextConfig(factory.find(hql, markers, values));
}
项目:openMAXIMS    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo getClinicianNote(ClinicianNoteDefaultTextConfigRefVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicianNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openMAXIMS    文件:MedicNoteDialogImpl.java   
public ims.emergency.vo.ClinicianNoteDefaultTextConfigVo getDefaultTriageNote(ims.clinical.configuration.vo.ClinicalProblemRefVo problem)
{
    if(problem == null || problem.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default medic note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultMedicNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {problem.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultMedicNoteList == null || defaultMedicNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create( (ClinicianNoteDefaultTextConfig) defaultMedicNoteList.get(0));
}
项目:openmaxims-linux    文件:AttendanceClinicalNoteDialogImpl.java   
public ClinicianNoteDefaultTextConfigVo getDefaultClinicianNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default clinician note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultClinicianNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {clinicalProblemRef.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultClinicianNoteList == null || defaultClinicianNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create((ClinicianNoteDefaultTextConfig) defaultClinicianNoteList.get(0));
}
项目:openmaxims-linux    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo saveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave) throws StaleObjectException
{
    if (clinicianNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null ClinicianNote");

    if (!clinicianNoteToSave.isValidated())
        throw new DomainRuntimeException("ClinicianNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    ClinicianNoteDefaultTextConfig domainClinicianNote = ClinicianNoteDefaultTextConfigVoAssembler.extractClinicianNoteDefaultTextConfig(factory, clinicianNoteToSave);

    factory.save(domainClinicianNote);

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openmaxims-linux    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVoCollection listClinicianNotes(ClinicalProblemVo presentingProblem, LookupInstVo status)
{
    DomainFactory factory = getDomainFactory();

    String hql = " select cn from ClinicianNoteDefaultTextConfig as cn ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    if (presentingProblem != null)
    {
        condStr.append(andStr + " where cn.problem.id = :cName");
        markers.add("cName");
        values.add(presentingProblem.getID_ClinicalProblem());
        andStr = " and ";
    }
    else
        andStr = " where ";

    if (status != null)
    {
        condStr.append(andStr + " cn.status.id = :cStatus");
        markers.add("cStatus");
        values.add(status.getID());
    }

    condStr.append(" order by UPPER(cn.problem.pCName) asc");

    hql += condStr.toString();
    return ClinicianNoteDefaultTextConfigVoAssembler.createClinicianNoteDefaultTextConfigVoCollectionFromClinicianNoteDefaultTextConfig(factory.find(hql, markers, values));
}
项目:openmaxims-linux    文件:ClinicianNoteTemplateConfigurationImpl.java   
public ClinicianNoteDefaultTextConfigVo getClinicianNote(ClinicianNoteDefaultTextConfigRefVo clinicianNote)
{
    if (clinicianNote == null || clinicianNote.getID_ClinicianNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get ClinicianNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    ClinicianNoteDefaultTextConfig domainClinicianNote = (ClinicianNoteDefaultTextConfig) factory.getDomainObject(ClinicianNoteDefaultTextConfig.class, clinicianNote.getID_ClinicianNoteDefaultTextConfig());

    return ClinicianNoteDefaultTextConfigVoAssembler.create(domainClinicianNote);
}
项目:openmaxims-linux    文件:MedicNoteDialogImpl.java   
public ims.emergency.vo.ClinicianNoteDefaultTextConfigVo getDefaultTriageNote(ims.clinical.configuration.vo.ClinicalProblemRefVo problem)
{
    if(problem == null || problem.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default medic note for a null Presenting Problem Id.");

    DomainFactory factory = getDomainFactory();
    String query = "select cn from ClinicianNoteDefaultTextConfig as cn left join cn.problem as p where p.id = :ProblemId and cn.status.id = :ActiveStatus ";

    List<?> defaultMedicNoteList = factory.find(query, new String[] {"ProblemId", "ActiveStatus"}, new Object[] {problem.getID_ClinicalProblem(), PreActiveActiveInactiveStatus.ACTIVE.getID()});

    if(defaultMedicNoteList == null || defaultMedicNoteList.size() == 0)
        return null;

    return ClinicianNoteDefaultTextConfigVoAssembler.create( (ClinicianNoteDefaultTextConfig) defaultMedicNoteList.get(0));
}