Java 类ims.nursing.vo.MiniNutritionalAssessment 实例源码

项目:AvoinApotti    文件:Logic.java   
protected MiniNutritionalAssessment populateDataFromScreen()
{
    MiniNutritionalAssessment record = super.populateDataFromScreen();

    Object hcpLite = domain.getHcpLiteUser();
    record.setHcpInitiated(hcpLite != null ? ((HcpLiteVo) hcpLite) : null);

    record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

    return record;
}
项目:AvoinApotti    文件:Logic.java   
protected MiniNutritionalAssessment populateDataFromScreen(MiniNutritionalAssessment value)
{
    MiniNutritionalAssessment record = super.populateDataFromScreen(value);

    record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

    return record;
}
项目:AvoinApotti    文件:MNAInputImpl.java   
/**
* get MiniNutritionalAssessment Record
*/
public ims.nursing.vo.MiniNutritionalAssessment getRecord(Integer recordID)
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssess = (ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment)factory.getDomainObject(ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment.class, recordID);
    return(MiniNutritionalAssessmentAssembler.create(domAssess));
}
项目:AvoinApotti    文件:MNAInputImpl.java   
/**
* check if Part of Eating Assessment
*/
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord)
        throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domMna = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, mnaRecord);
    java.util.List mnas = factory.find("from EatingComponent E where E.miniNutritionalAssessment = :mna", "mna", domMna);

    if(mnas == null || mnas.size() == 0)
        return Boolean.FALSE;

    return Boolean.TRUE;
}
项目:AvoinApotti    文件:MNAInputImpl.java   
public MnaEnhancedVo saveAll(MnaEnhancedVo mnaEnhancedRecordVo, CareContextShortVo careContext) throws DomainInterfaceException,StaleObjectException, UniqueKeyViolationException {
    // Ensure the Value Object was validated
    if (!mnaEnhancedRecordVo.isValidated())
        throw new DomainRuntimeException("This MnaEnhanced VO has not been validated");

    VitalSignsVo vs = null;
    if(mnaEnhancedRecordVo.getVsRecord() != null){
        vs = insertMetricsRecord(mnaEnhancedRecordVo.getVsRecord());
        if(vs!=null)
            mnaEnhancedRecordVo.getMnaRecord().setMetrics(vs.getMetrics());
    }

    mnaEnhancedRecordVo.getMnaRecord().validate();

    MiniNutritionalAssessment mna = saveRecord(mnaEnhancedRecordVo.getMnaRecord());
    AssessmentHeaderInfo headerInfo = null;

    if(mnaEnhancedRecordVo.getVsRecord() != null)
        insertMetricsRecord(mnaEnhancedRecordVo.getVsRecord());
    if(mnaEnhancedRecordVo.getAedRecord() != null)
    {
        mnaEnhancedRecordVo.getAedRecord().setMiniNutritionalAssessment(mna);
        mnaEnhancedRecordVo.getAedRecord().validate();
        headerInfo = saveEatingAssessmentComponent(mnaEnhancedRecordVo.getAshRecord(), mnaEnhancedRecordVo.getAedRecord(), careContext);
    }

    mnaEnhancedRecordVo.setMnaRecord(mna);
    mnaEnhancedRecordVo.setAshRecord(headerInfo);

    return mnaEnhancedRecordVo;

}
项目:openMAXIMS    文件:Logic.java   
protected MiniNutritionalAssessment populateDataFromScreen()
{
    MiniNutritionalAssessment record = super.populateDataFromScreen();

    Object hcpLite = domain.getHcpLiteUser();
    record.setHcpInitiated(hcpLite != null ? ((HcpLiteVo) hcpLite) : null);

    record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

    return record;
}
项目:openMAXIMS    文件:Logic.java   
protected MiniNutritionalAssessment populateDataFromScreen(MiniNutritionalAssessment value)
{
    MiniNutritionalAssessment record = super.populateDataFromScreen(value);

    record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

    return record;
}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* get MiniNutritionalAssessment Record
*/
public ims.nursing.vo.MiniNutritionalAssessment getRecord(Integer recordID)
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssess = (ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment)factory.getDomainObject(ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment.class, recordID);
    return(MiniNutritionalAssessmentAssembler.create(domAssess));
}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* check if Part of Eating Assessment
*/
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord)
        throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domMna = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, mnaRecord);
    java.util.List mnas = factory.find("from EatingComponent E where E.miniNutritionalAssessment = :mna", "mna", domMna);

    if(mnas == null || mnas.size() == 0)
        return Boolean.FALSE;

    return Boolean.TRUE;
}
项目:openMAXIMS    文件:MNAInputImpl.java   
public MnaEnhancedVo saveAll(MnaEnhancedVo mnaEnhancedRecordVo, CareContextShortVo careContext) throws DomainInterfaceException,StaleObjectException, UniqueKeyViolationException {
    // Ensure the Value Object was validated
    if (!mnaEnhancedRecordVo.isValidated())
        throw new DomainRuntimeException("This MnaEnhanced VO has not been validated");

    VitalSignsVo vs = null;
    if(mnaEnhancedRecordVo.getVsRecord() != null){
        vs = insertMetricsRecord(mnaEnhancedRecordVo.getVsRecord());
        if(vs!=null)
            mnaEnhancedRecordVo.getMnaRecord().setMetrics(vs.getMetrics());
    }

    mnaEnhancedRecordVo.getMnaRecord().validate();

    MiniNutritionalAssessment mna = saveRecord(mnaEnhancedRecordVo.getMnaRecord());
    AssessmentHeaderInfo headerInfo = null;

    if(mnaEnhancedRecordVo.getVsRecord() != null)
        insertMetricsRecord(mnaEnhancedRecordVo.getVsRecord());
    if(mnaEnhancedRecordVo.getAedRecord() != null)
    {
        mnaEnhancedRecordVo.getAedRecord().setMiniNutritionalAssessment(mna);
        mnaEnhancedRecordVo.getAedRecord().validate();
        headerInfo = saveEatingAssessmentComponent(mnaEnhancedRecordVo.getAshRecord(), mnaEnhancedRecordVo.getAedRecord(), careContext);
    }

    mnaEnhancedRecordVo.setMnaRecord(mna);
    mnaEnhancedRecordVo.setAshRecord(headerInfo);

    return mnaEnhancedRecordVo;

}
项目:openMAXIMS    文件:Logic.java   
protected MiniNutritionalAssessment populateDataFromScreen()
{
    MiniNutritionalAssessment record = super.populateDataFromScreen();

    Object hcpLite = domain.getHcpLiteUser();
    record.setHcpInitiated(hcpLite != null ? ((HcpLiteVo) hcpLite) : null);

    record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

    return record;
}
项目:openMAXIMS    文件:Logic.java   
protected MiniNutritionalAssessment populateDataFromScreen(MiniNutritionalAssessment value)
{
    MiniNutritionalAssessment record = super.populateDataFromScreen(value);

    record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

    return record;
}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* get MiniNutritionalAssessment Record
*/
public ims.nursing.vo.MiniNutritionalAssessment getRecord(Integer recordID)
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssess = (ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment)factory.getDomainObject(ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment.class, recordID);
    return(MiniNutritionalAssessmentAssembler.create(domAssess));
}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* check if Part of Eating Assessment
*/
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord)
        throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domMna = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, mnaRecord);
    java.util.List mnas = factory.find("from EatingComponent E where E.miniNutritionalAssessment = :mna", "mna", domMna);

    if(mnas == null || mnas.size() == 0)
        return Boolean.FALSE;

    return Boolean.TRUE;
}
项目:openMAXIMS    文件:MNAInputImpl.java   
public MnaEnhancedVo saveAll(MnaEnhancedVo mnaEnhancedRecordVo, CareContextShortVo careContext) throws DomainInterfaceException,StaleObjectException, UniqueKeyViolationException {
    // Ensure the Value Object was validated
    if (!mnaEnhancedRecordVo.isValidated())
        throw new DomainRuntimeException("This MnaEnhanced VO has not been validated");

    VitalSignsVo vs = null;
    if(mnaEnhancedRecordVo.getVsRecord() != null){
        vs = insertMetricsRecord(mnaEnhancedRecordVo.getVsRecord());
        if(vs!=null)
            mnaEnhancedRecordVo.getMnaRecord().setMetrics(vs.getMetrics());
    }

    mnaEnhancedRecordVo.getMnaRecord().validate();

    MiniNutritionalAssessment mna = saveRecord(mnaEnhancedRecordVo.getMnaRecord());
    AssessmentHeaderInfo headerInfo = null;

    if(mnaEnhancedRecordVo.getVsRecord() != null)
        insertMetricsRecord(mnaEnhancedRecordVo.getVsRecord());
    if(mnaEnhancedRecordVo.getAedRecord() != null)
    {
        mnaEnhancedRecordVo.getAedRecord().setMiniNutritionalAssessment(mna);
        mnaEnhancedRecordVo.getAedRecord().validate();
        headerInfo = saveEatingAssessmentComponent(mnaEnhancedRecordVo.getAshRecord(), mnaEnhancedRecordVo.getAedRecord(), careContext);
    }

    mnaEnhancedRecordVo.setMnaRecord(mna);
    mnaEnhancedRecordVo.setAshRecord(headerInfo);

    return mnaEnhancedRecordVo;

}
项目:openmaxims-linux    文件:Logic.java   
protected MiniNutritionalAssessment populateDataFromScreen()
{
    MiniNutritionalAssessment record = super.populateDataFromScreen();

    Object hcpLite = domain.getHcpLiteUser();
    record.setHcpInitiated(hcpLite != null ? ((HcpLiteVo) hcpLite) : null);

    record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

    return record;
}
项目:openmaxims-linux    文件:Logic.java   
protected MiniNutritionalAssessment populateDataFromScreen(MiniNutritionalAssessment value)
{
    MiniNutritionalAssessment record = super.populateDataFromScreen(value);

    record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

    return record;
}
项目:openmaxims-linux    文件:MNAInputImpl.java   
/**
* get MiniNutritionalAssessment Record
*/
public ims.nursing.vo.MiniNutritionalAssessment getRecord(Integer recordID)
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssess = (ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment)factory.getDomainObject(ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment.class, recordID);
    return(MiniNutritionalAssessmentAssembler.create(domAssess));
}
项目:openmaxims-linux    文件:MNAInputImpl.java   
/**
* check if Part of Eating Assessment
*/
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord)
        throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domMna = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, mnaRecord);
    java.util.List mnas = factory.find("from EatingComponent E where E.miniNutritionalAssessment = :mna", "mna", domMna);

    if(mnas == null || mnas.size() == 0)
        return Boolean.FALSE;

    return Boolean.TRUE;
}
项目:openmaxims-linux    文件:MNAInputImpl.java   
public MnaEnhancedVo saveAll(MnaEnhancedVo mnaEnhancedRecordVo, CareContextShortVo careContext) throws DomainInterfaceException,StaleObjectException, UniqueKeyViolationException {
    // Ensure the Value Object was validated
    if (!mnaEnhancedRecordVo.isValidated())
        throw new DomainRuntimeException("This MnaEnhanced VO has not been validated");

    VitalSignsVo vs = null;
    if(mnaEnhancedRecordVo.getVsRecord() != null){
        vs = insertMetricsRecord(mnaEnhancedRecordVo.getVsRecord());
        if(vs!=null)
            mnaEnhancedRecordVo.getMnaRecord().setMetrics(vs.getMetrics());
    }

    mnaEnhancedRecordVo.getMnaRecord().validate();

    MiniNutritionalAssessment mna = saveRecord(mnaEnhancedRecordVo.getMnaRecord());
    AssessmentHeaderInfo headerInfo = null;

    if(mnaEnhancedRecordVo.getVsRecord() != null)
        insertMetricsRecord(mnaEnhancedRecordVo.getVsRecord());
    if(mnaEnhancedRecordVo.getAedRecord() != null)
    {
        mnaEnhancedRecordVo.getAedRecord().setMiniNutritionalAssessment(mna);
        mnaEnhancedRecordVo.getAedRecord().validate();
        headerInfo = saveEatingAssessmentComponent(mnaEnhancedRecordVo.getAshRecord(), mnaEnhancedRecordVo.getAedRecord(), careContext);
    }

    mnaEnhancedRecordVo.setMnaRecord(mna);
    mnaEnhancedRecordVo.setAshRecord(headerInfo);

    return mnaEnhancedRecordVo;

}
项目:AvoinApotti    文件:Logic.java   
protected void populateScreenFromData(MiniNutritionalAssessment value)
{
    super.populateScreenFromData(value);
}
项目:AvoinApotti    文件:Logic.java   
@SuppressWarnings("unchecked")
private void printReport()
{
    MiniNutritionalAssessment mna = form.cmbRecordToUpdate().getValue();

    if (mna == null)
        return;

    int nCol = -1;
    ArrayList ids = form.getLocalContext().getMNAIds();

    for (int i = 0; i < ids.size(); i++)
    {
        if (mna.getID_Assessment().equals(ids.get(i)))
        {
            nCol = i;
            break;
        }
    }

    if (nCol == -1)
    {
        engine.showMessage("Internal error, could not find the MNA record to print !");
        return;
    }

    String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
    String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();

    String[] obj = null;
    try
    {
        obj = domain.getReportAndTemplate(form.getGlobalContext().Core.getReportID(), form.getGlobalContext().Core.getTemplateID());
    }
    catch (DomainInterfaceException e)
    {
        engine.showMessage("Error retrieving report template !\r\n" + e.getMessage());
        return;
    }

    if (obj == null || obj.length == 0)
    {
        engine.showMessage("I could not get the report and template !");
        return;
    }

    PatientShort ps = form.getGlobalContext().Core.getPatientShort();
    QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());

    client.addSeed(new SeedValue("MNA_ID", mna.getID_Assessment(), Integer.class));
    if (ps != null)
    {
        ims.core.vo.PatientId id = ps.getDisplayId();
        if (id != null)
        {
            client.addSeed(new SeedValue("PID", id.getValue(), String.class));
        }

        client.addSeed(new SeedValue("AGE", ps.getAge(), Integer.class));
    }

    addExtraSeeds(nCol, client, mna);

    String resultUrl = "";

    try
    {
        resultUrl = client.buildReportAsUrl(obj[0], obj[1], urlReportServer, QueryBuilderClient.PDF, "", 1);
    }
    catch (QueryBuilderClientException e1)
    {
        engine.showMessage("Error creating report: " + e1.getMessage());
        return;
    }

    engine.openUrl(resultUrl);
}
项目:AvoinApotti    文件:MNAInputImpl.java   
/**
* save MiniNutritionalAssessment Record
*/
public MiniNutritionalAssessment saveRecord(MiniNutritionalAssessment voMiniNutritionalAssessment) throws DomainInterfaceException, StaleObjectException 
{
    // Ensure the Value Object was validated
    if (!voMiniNutritionalAssessment.isValidated())
        throw new DomainRuntimeException("This FallAssessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssessment = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, voMiniNutritionalAssessment);

    factory.save(domAssessment);

    return MiniNutritionalAssessmentAssembler.create(domAssessment);    


}
项目:AvoinApotti    文件:MNAViewImpl.java   
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord) throws DomainInterfaceException
{
    MNAInput impl = (MNAInput) getDomainImpl(MNAInputImpl.class);

    return impl.isPartOfEatingAssessment(mnaRecord);
}
项目:openMAXIMS    文件:Logic.java   
protected void populateScreenFromData(MiniNutritionalAssessment value)
{
    super.populateScreenFromData(value);
}
项目:openMAXIMS    文件:Logic.java   
@SuppressWarnings("unchecked")
private void printReport()
{
    MiniNutritionalAssessment mna = form.cmbRecordToUpdate().getValue();

    if (mna == null)
        return;

    int nCol = -1;
    ArrayList ids = form.getLocalContext().getMNAIds();

    for (int i = 0; i < ids.size(); i++)
    {
        if (mna.getID_Assessment().equals(ids.get(i)))
        {
            nCol = i;
            break;
        }
    }

    if (nCol == -1)
    {
        engine.showMessage("Internal error, could not find the MNA record to print !");
        return;
    }

    String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
    String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();

    String[] obj = null;
    try
    {
        obj = domain.getReportAndTemplate(form.getGlobalContext().Core.getReportID(), form.getGlobalContext().Core.getTemplateID());
    }
    catch (DomainInterfaceException e)
    {
        engine.showMessage("Error retrieving report template !\r\n" + e.getMessage());
        return;
    }

    if (obj == null || obj.length == 0)
    {
        engine.showMessage("I could not get the report and template !");
        return;
    }

    PatientShort ps = form.getGlobalContext().Core.getPatientShort();
    QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());

    client.addSeed(new SeedValue("MNA_ID", mna.getID_Assessment(), Integer.class));
    if (ps != null)
    {
        ims.core.vo.PatientId id = ps.getDisplayId();
        if (id != null)
        {
            client.addSeed(new SeedValue("PID", id.getValue(), String.class));
        }

        client.addSeed(new SeedValue("AGE", ps.getAge(), Integer.class));
    }

    addExtraSeeds(nCol, client, mna);

    String resultUrl = "";

    try
    {
        resultUrl = client.buildReportAsUrl(obj[0], obj[1], urlReportServer, QueryBuilderClient.PDF, "", 1);
    }
    catch (QueryBuilderClientException e1)
    {
        engine.showMessage("Error creating report: " + e1.getMessage());
        return;
    }

    engine.openUrl(resultUrl);
}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* save MiniNutritionalAssessment Record
*/
public MiniNutritionalAssessment saveRecord(MiniNutritionalAssessment voMiniNutritionalAssessment) throws DomainInterfaceException, StaleObjectException 
{
    // Ensure the Value Object was validated
    if (!voMiniNutritionalAssessment.isValidated())
        throw new DomainRuntimeException("This FallAssessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssessment = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, voMiniNutritionalAssessment);

    factory.save(domAssessment);

    return MiniNutritionalAssessmentAssembler.create(domAssessment);    


}
项目:openMAXIMS    文件:MNAViewImpl.java   
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord) throws DomainInterfaceException
{
    MNAInput impl = (MNAInput) getDomainImpl(MNAInputImpl.class);

    return impl.isPartOfEatingAssessment(mnaRecord);
}
项目:openMAXIMS    文件:Logic.java   
protected void populateScreenFromData(MiniNutritionalAssessment value)
{
    super.populateScreenFromData(value);
}
项目:openMAXIMS    文件:Logic.java   
@SuppressWarnings("unchecked")
private void printReport()
{
    MiniNutritionalAssessment mna = form.cmbRecordToUpdate().getValue();

    if (mna == null)
        return;

    int nCol = -1;
    ArrayList ids = form.getLocalContext().getMNAIds();

    for (int i = 0; i < ids.size(); i++)
    {
        if (mna.getID_Assessment().equals(ids.get(i)))
        {
            nCol = i;
            break;
        }
    }

    if (nCol == -1)
    {
        engine.showMessage("Internal error, could not find the MNA record to print !");
        return;
    }

    String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
    String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();

    String[] obj = null;
    try
    {
        obj = domain.getReportAndTemplate(form.getGlobalContext().Core.getReportID(), form.getGlobalContext().Core.getTemplateID());
    }
    catch (DomainInterfaceException e)
    {
        engine.showMessage("Error retrieving report template !\r\n" + e.getMessage());
        return;
    }

    if (obj == null || obj.length == 0)
    {
        engine.showMessage("I could not get the report and template !");
        return;
    }

    PatientShort ps = form.getGlobalContext().Core.getPatientShort();
    QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());

    client.addSeed(new SeedValue("MNA_ID", mna.getID_Assessment(), Integer.class));
    if (ps != null)
    {
        ims.core.vo.PatientId id = ps.getDisplayId();
        if (id != null)
        {
            client.addSeed(new SeedValue("PID", id.getValue(), String.class));
        }

        client.addSeed(new SeedValue("AGE", ps.getAge(), Integer.class));
    }

    addExtraSeeds(nCol, client, mna);

    String resultUrl = "";

    try
    {
        resultUrl = client.buildReportAsUrl(obj[0], obj[1], urlReportServer, QueryBuilderClient.PDF, "", 1);
    }
    catch (QueryBuilderClientException e1)
    {
        engine.showMessage("Error creating report: " + e1.getMessage());
        return;
    }

    engine.openUrl(resultUrl);
}
项目:openMAXIMS    文件:MNAInputImpl.java   
/**
* save MiniNutritionalAssessment Record
*/
public MiniNutritionalAssessment saveRecord(MiniNutritionalAssessment voMiniNutritionalAssessment) throws DomainInterfaceException, StaleObjectException 
{
    // Ensure the Value Object was validated
    if (!voMiniNutritionalAssessment.isValidated())
        throw new DomainRuntimeException("This FallAssessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssessment = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, voMiniNutritionalAssessment);

    factory.save(domAssessment);

    return MiniNutritionalAssessmentAssembler.create(domAssessment);    


}
项目:openMAXIMS    文件:MNAViewImpl.java   
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord) throws DomainInterfaceException
{
    MNAInput impl = (MNAInput) getDomainImpl(MNAInputImpl.class);

    return impl.isPartOfEatingAssessment(mnaRecord);
}
项目:openmaxims-linux    文件:Logic.java   
protected void populateScreenFromData(MiniNutritionalAssessment value)
{
    super.populateScreenFromData(value);
}
项目:openmaxims-linux    文件:Logic.java   
@SuppressWarnings("unchecked")
private void printReport()
{
    MiniNutritionalAssessment mna = form.cmbRecordToUpdate().getValue();

    if (mna == null)
        return;

    int nCol = -1;
    ArrayList ids = form.getLocalContext().getMNAIds();

    for (int i = 0; i < ids.size(); i++)
    {
        if (mna.getID_Assessment().equals(ids.get(i)))
        {
            nCol = i;
            break;
        }
    }

    if (nCol == -1)
    {
        engine.showMessage("Internal error, could not find the MNA record to print !");
        return;
    }

    String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
    String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();

    String[] obj = null;
    try
    {
        obj = domain.getReportAndTemplate(form.getGlobalContext().Core.getReportID(), form.getGlobalContext().Core.getTemplateID());
    }
    catch (DomainInterfaceException e)
    {
        engine.showMessage("Error retrieving report template !\r\n" + e.getMessage());
        return;
    }

    if (obj == null || obj.length == 0)
    {
        engine.showMessage("I could not get the report and template !");
        return;
    }

    PatientShort ps = form.getGlobalContext().Core.getPatientShort();
    QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());

    client.addSeed(new SeedValue("MNA_ID", mna.getID_Assessment(), Integer.class));
    if (ps != null)
    {
        ims.core.vo.PatientId id = ps.getDisplayId();
        if (id != null)
        {
            client.addSeed(new SeedValue("PID", id.getValue(), String.class));
        }

        client.addSeed(new SeedValue("AGE", ps.getAge(), Integer.class));
    }

    addExtraSeeds(nCol, client, mna);

    String resultUrl = "";

    try
    {
        resultUrl = client.buildReportAsUrl(obj[0], obj[1], urlReportServer, QueryBuilderClient.PDF, "", 1);
    }
    catch (QueryBuilderClientException e1)
    {
        engine.showMessage("Error creating report: " + e1.getMessage());
        return;
    }

    engine.openUrl(resultUrl);
}
项目:openmaxims-linux    文件:MNAInputImpl.java   
/**
* save MiniNutritionalAssessment Record
*/
public MiniNutritionalAssessment saveRecord(MiniNutritionalAssessment voMiniNutritionalAssessment) throws DomainInterfaceException, StaleObjectException 
{
    // Ensure the Value Object was validated
    if (!voMiniNutritionalAssessment.isValidated())
        throw new DomainRuntimeException("This FallAssessment has not been validated");

    DomainFactory factory = getDomainFactory();         
    ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessment domAssessment = MiniNutritionalAssessmentAssembler.extractMiniNutritionalAssessment(factory, voMiniNutritionalAssessment);

    factory.save(domAssessment);

    return MiniNutritionalAssessmentAssembler.create(domAssessment);    


}
项目:openmaxims-linux    文件:MNAViewImpl.java   
public Boolean isPartOfEatingAssessment(MiniNutritionalAssessment mnaRecord) throws DomainInterfaceException
{
    MNAInput impl = (MNAInput) getDomainImpl(MNAInputImpl.class);

    return impl.isPartOfEatingAssessment(mnaRecord);
}