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

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

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

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

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

    return TriageNoteDefaultTextConfigVoAssembler.create((TriageNoteDefaultTextConfig) defaultTriageNoteList.get(0));
}
项目:AvoinApotti    文件:TriageNoteDialogImpl.java   
public TriageNoteDefaultTextConfigVo getDefaultTriageNote(ClinicalProblemRefVo problem) 
{
    if(problem == null || problem.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default triage note for a null Presenting Problem Id.");

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

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

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

    return TriageNoteDefaultTextConfigVoAssembler.create((TriageNoteDefaultTextConfig) defaultTriageNoteList.get(0));
}
项目:AvoinApotti    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVo saveTriageNote(TriageNoteDefaultTextConfigVo triageNoteToSave) throws StaleObjectException
{
    if (triageNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null TriageNote");

    if (!triageNoteToSave.isValidated())
        throw new DomainRuntimeException("TriageNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    TriageNoteDefaultTextConfig domainNote = TriageNoteDefaultTextConfigVoAssembler.extractTriageNoteDefaultTextConfig(factory, triageNoteToSave);

    factory.save(domainNote);

    return TriageNoteDefaultTextConfigVoAssembler.create(domainNote);
}
项目:AvoinApotti    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVoCollection listTriageNotes(ClinicalProblemVo presentingProblem, LookupInstVo status)
{

    DomainFactory factory = getDomainFactory();

    String hql = " select tn from TriageNoteDefaultTextConfig as tn ";
    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 tn.problem.id = :tName");
        markers.add("tName");
        values.add(presentingProblem.getID_ClinicalProblem());
        andStr = " and ";
    }
    else
        andStr = " where ";

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

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

    hql += condStr.toString();
    return TriageNoteDefaultTextConfigVoAssembler.createTriageNoteDefaultTextConfigVoCollectionFromTriageNoteDefaultTextConfig(factory.find(hql, markers, values));
}
项目:AvoinApotti    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVo getTriageNote(TriageNoteDefaultTextConfigRefVo triageNote)
{
    if (triageNote == null || triageNote.getID_TriageNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get TriageNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    TriageNoteDefaultTextConfig domainTriageNote = (TriageNoteDefaultTextConfig) factory.getDomainObject(TriageNoteDefaultTextConfig.class, triageNote.getID_TriageNoteDefaultTextConfig());

    return TriageNoteDefaultTextConfigVoAssembler.create(domainTriageNote);
}
项目:openMAXIMS    文件:AttendanceClinicalNoteDialogImpl.java   
public TriageNoteDefaultTextConfigVo getDefaultTriageNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default triage note for a null Presenting Problem Id.");

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

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

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

    return TriageNoteDefaultTextConfigVoAssembler.create((TriageNoteDefaultTextConfig) defaultTriageNoteList.get(0));
}
项目:openMAXIMS    文件:TriageNoteDialogImpl.java   
public TriageNoteDefaultTextConfigVo getDefaultTriageNote(ClinicalProblemRefVo problem) 
{
    if(problem == null || problem.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default triage note for a null Presenting Problem Id.");

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

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

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

    return TriageNoteDefaultTextConfigVoAssembler.create((TriageNoteDefaultTextConfig) defaultTriageNoteList.get(0));
}
项目:openMAXIMS    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVo saveTriageNote(TriageNoteDefaultTextConfigVo triageNoteToSave) throws StaleObjectException
{
    if (triageNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null TriageNote");

    if (!triageNoteToSave.isValidated())
        throw new DomainRuntimeException("TriageNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    TriageNoteDefaultTextConfig domainNote = TriageNoteDefaultTextConfigVoAssembler.extractTriageNoteDefaultTextConfig(factory, triageNoteToSave);

    factory.save(domainNote);

    return TriageNoteDefaultTextConfigVoAssembler.create(domainNote);
}
项目:openMAXIMS    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVoCollection listTriageNotes(ClinicalProblemVo presentingProblem, LookupInstVo status)
{

    DomainFactory factory = getDomainFactory();

    String hql = " select tn from TriageNoteDefaultTextConfig as tn ";
    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 tn.problem.id = :tName");
        markers.add("tName");
        values.add(presentingProblem.getID_ClinicalProblem());
        andStr = " and ";
    }
    else
        andStr = " where ";

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

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

    hql += condStr.toString();
    return TriageNoteDefaultTextConfigVoAssembler.createTriageNoteDefaultTextConfigVoCollectionFromTriageNoteDefaultTextConfig(factory.find(hql, markers, values));
}
项目:openMAXIMS    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVo getTriageNote(TriageNoteDefaultTextConfigRefVo triageNote)
{
    if (triageNote == null || triageNote.getID_TriageNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get TriageNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    TriageNoteDefaultTextConfig domainTriageNote = (TriageNoteDefaultTextConfig) factory.getDomainObject(TriageNoteDefaultTextConfig.class, triageNote.getID_TriageNoteDefaultTextConfig());

    return TriageNoteDefaultTextConfigVoAssembler.create(domainTriageNote);
}
项目:openMAXIMS    文件:AttendanceClinicalNoteDialogImpl.java   
public TriageNoteDefaultTextConfigVo getDefaultTriageNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default triage note for a null Presenting Problem Id.");

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

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

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

    return TriageNoteDefaultTextConfigVoAssembler.create((TriageNoteDefaultTextConfig) defaultTriageNoteList.get(0));
}
项目:openMAXIMS    文件:TriageNoteDialogImpl.java   
public TriageNoteDefaultTextConfigVo getDefaultTriageNote(ClinicalProblemRefVo problem) 
{
    if(problem == null || problem.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default triage note for a null Presenting Problem Id.");

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

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

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

    return TriageNoteDefaultTextConfigVoAssembler.create((TriageNoteDefaultTextConfig) defaultTriageNoteList.get(0));
}
项目:openMAXIMS    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVo saveTriageNote(TriageNoteDefaultTextConfigVo triageNoteToSave) throws StaleObjectException
{
    if (triageNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null TriageNote");

    if (!triageNoteToSave.isValidated())
        throw new DomainRuntimeException("TriageNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    TriageNoteDefaultTextConfig domainNote = TriageNoteDefaultTextConfigVoAssembler.extractTriageNoteDefaultTextConfig(factory, triageNoteToSave);

    factory.save(domainNote);

    return TriageNoteDefaultTextConfigVoAssembler.create(domainNote);
}
项目:openMAXIMS    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVoCollection listTriageNotes(ClinicalProblemVo presentingProblem, LookupInstVo status)
{

    DomainFactory factory = getDomainFactory();

    String hql = " select tn from TriageNoteDefaultTextConfig as tn ";
    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 tn.problem.id = :tName");
        markers.add("tName");
        values.add(presentingProblem.getID_ClinicalProblem());
        andStr = " and ";
    }
    else
        andStr = " where ";

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

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

    hql += condStr.toString();
    return TriageNoteDefaultTextConfigVoAssembler.createTriageNoteDefaultTextConfigVoCollectionFromTriageNoteDefaultTextConfig(factory.find(hql, markers, values));
}
项目:openMAXIMS    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVo getTriageNote(TriageNoteDefaultTextConfigRefVo triageNote)
{
    if (triageNote == null || triageNote.getID_TriageNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get TriageNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    TriageNoteDefaultTextConfig domainTriageNote = (TriageNoteDefaultTextConfig) factory.getDomainObject(TriageNoteDefaultTextConfig.class, triageNote.getID_TriageNoteDefaultTextConfig());

    return TriageNoteDefaultTextConfigVoAssembler.create(domainTriageNote);
}
项目:openmaxims-linux    文件:AttendanceClinicalNoteDialogImpl.java   
public TriageNoteDefaultTextConfigVo getDefaultTriageNote(ClinicalProblemRefVo clinicalProblemRef)
{
    if(clinicalProblemRef == null || clinicalProblemRef.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default triage note for a null Presenting Problem Id.");

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

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

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

    return TriageNoteDefaultTextConfigVoAssembler.create((TriageNoteDefaultTextConfig) defaultTriageNoteList.get(0));
}
项目:openmaxims-linux    文件:TriageNoteDialogImpl.java   
public TriageNoteDefaultTextConfigVo getDefaultTriageNote(ClinicalProblemRefVo problem) 
{
    if(problem == null || problem.getID_ClinicalProblem() == null)
        throw new CodingRuntimeException("Cannot get default triage note for a null Presenting Problem Id.");

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

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

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

    return TriageNoteDefaultTextConfigVoAssembler.create((TriageNoteDefaultTextConfig) defaultTriageNoteList.get(0));
}
项目:openmaxims-linux    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVo saveTriageNote(TriageNoteDefaultTextConfigVo triageNoteToSave) throws StaleObjectException
{
    if (triageNoteToSave == null)
        throw new CodingRuntimeException("Cannot save null TriageNote");

    if (!triageNoteToSave.isValidated())
        throw new DomainRuntimeException("TriageNoteVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    TriageNoteDefaultTextConfig domainNote = TriageNoteDefaultTextConfigVoAssembler.extractTriageNoteDefaultTextConfig(factory, triageNoteToSave);

    factory.save(domainNote);

    return TriageNoteDefaultTextConfigVoAssembler.create(domainNote);
}
项目:openmaxims-linux    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVoCollection listTriageNotes(ClinicalProblemVo presentingProblem, LookupInstVo status)
{

    DomainFactory factory = getDomainFactory();

    String hql = " select tn from TriageNoteDefaultTextConfig as tn ";
    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 tn.problem.id = :tName");
        markers.add("tName");
        values.add(presentingProblem.getID_ClinicalProblem());
        andStr = " and ";
    }
    else
        andStr = " where ";

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

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

    hql += condStr.toString();
    return TriageNoteDefaultTextConfigVoAssembler.createTriageNoteDefaultTextConfigVoCollectionFromTriageNoteDefaultTextConfig(factory.find(hql, markers, values));
}
项目:openmaxims-linux    文件:TriageNoteTemplateConfigurationImpl.java   
public TriageNoteDefaultTextConfigVo getTriageNote(TriageNoteDefaultTextConfigRefVo triageNote)
{
    if (triageNote == null || triageNote.getID_TriageNoteDefaultTextConfig() == null)
    {
        throw new CodingRuntimeException("Cannot get TriageNoteDefaultTextConfigVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    TriageNoteDefaultTextConfig domainTriageNote = (TriageNoteDefaultTextConfig) factory.getDomainObject(TriageNoteDefaultTextConfig.class, triageNote.getID_TriageNoteDefaultTextConfig());

    return TriageNoteDefaultTextConfigVoAssembler.create(domainTriageNote);
}