Java 类ims.therapies.vo.HomeVisitVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if(voHomeVisit==null)
        return false;

    if ((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null 
            && voCurrentClinicalContact.getID_ClinicalContactIsNotNull() && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
            || (voHomeVisit.getClinicalContact() == null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if (voHomeVisit== null){
        engine.showMessage("Active Home Visit Access record is required to use this screen. ");
        return false;
    }

    if((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null && voCurrentClinicalContact.getID_ClinicalContactIsNotNull() 
    && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
    || (voHomeVisit.getClinicalContact()== null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if (voHomeVisit== null){
        engine.showMessage("Active Home Visit Access record is required to use this screen. ");
        return false;
    }

    if((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null
    && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
    || (voHomeVisit.getClinicalContact() == null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreen(HomeVisitVo voHomeVisit) 
{
    form.getLocalContext().setVisitSummaryVo(null);
    if(voHomeVisit == null) return;

    form.customControlAuthoring().setValue(voHomeVisit.getAuthoringInformation());

    if(voHomeVisit.getHouseDetailsIsNotNull() && voHomeVisit.getHouseDetails().getAddressIsNotNull())
        form.txtAddress().setValue(voHomeVisit.getHouseDetails().getAddress());

    VisitSummaryVo voVisitSummary = voHomeVisit.getVisitSummary();

    if(voVisitSummary!=null)
    {
        form.txtProblems().setValue(voVisitSummary.getProblemsIdentified());
        form.txtRecommendations().setValue(voVisitSummary.getRecommendations());
        form.txtEquipmentReqs().setValue(voVisitSummary.getEquipment());
        form.txtConclusions().setValue(voVisitSummary.getConclusions());
    }

    form.getLocalContext().setHomeVisitVo(voHomeVisit);
    form.getLocalContext().setVisitSummaryVo(voHomeVisit.getVisitSummary());
}
项目:AvoinApotti    文件:HomeVisitAccessImpl.java   
public HomeVisitVo saveHomeVisitAccess(HomeVisitVo homeVisitVo) throws StaleObjectException, UniqueKeyViolationException {
    DomainFactory factory = getDomainFactory(); 

    if (!homeVisitVo.isValidated())
    {
        throw new DomainRuntimeException("This HomeVisitVo has not been validated");
    }

    if(homeVisitVo.getID_HomeVisit() == null)
    {
        if(homeVisitVo.getCareContextIsNotNull())
        {
            HomeVisitVoCollection coll = getHomeVisitVoByCareContext(homeVisitVo.getCareContext());
            if(coll != null && coll.size()>0)
                throw new UniqueKeyViolationException("A Home Visit record already exists for this CareContext. ");
        }
    }
    HomeVisit domHomeVisit = HomeVisitVoAssembler.extractHomeVisit(factory, homeVisitVo);

    factory.save(domHomeVisit);

    return HomeVisitVoAssembler.create(domHomeVisit);
}
项目:AvoinApotti    文件:HomeVisitAccessImpl.java   
public HomeVisitVo getHomeVisitAccByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if(voClinicalContactRef == null || voClinicalContactRef.getID_ClinicalContact() == null)
        throw new DomainRuntimeException("Contact not provided for get call. ");

    DomainFactory factory = getDomainFactory();

    java.util.List home = factory.find("from HomeVisit hv where hv.clinicalContact.id = :contactId", new String[]{"contactId"}, new Object[]{voClinicalContactRef.getID_ClinicalContact()});

    if  ((home != null) && (home.size()>0)){
        HomeVisitVoCollection collHomeVisit  = HomeVisitVoAssembler.createHomeVisitVoCollectionFromHomeVisit(home);
        if(collHomeVisit!=null && collHomeVisit.size()!=0)
            return collHomeVisit.get(0);
    }

    return null;
}
项目:AvoinApotti    文件:HomeVisitAccessImpl.java   
public HomeVisitVo getHomeVisitAccByCareContext(CareContextRefVo voCareContextRef)
{
    if(voCareContextRef == null || voCareContextRef.getID_CareContext() == null)
        throw new DomainRuntimeException("Context not provided for get call. ");

    DomainFactory factory = getDomainFactory();

    java.util.List home = factory.find("from HomeVisit hv where hv.careContext.id = :id and hv.clinicalContact is null", new String[]{"id"}, new Object[]{voCareContextRef.getID_CareContext()});

    //WDEV-13700
    if  (home == null || home.size() == 0)
        return null;

    HomeVisitVoCollection collection = HomeVisitVoAssembler.createHomeVisitVoCollectionFromHomeVisit(home);

    if (collection != null && collection.size() > 0) 
        return collection.get(0);

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if(voHomeVisit==null)
        return false;

    if ((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null 
            && voCurrentClinicalContact.getID_ClinicalContactIsNotNull() && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
            || (voHomeVisit.getClinicalContact() == null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if (voHomeVisit== null){
        engine.showMessage("Active Home Visit Access record is required to use this screen. ");
        return false;
    }

    if((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null && voCurrentClinicalContact.getID_ClinicalContactIsNotNull() 
    && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
    || (voHomeVisit.getClinicalContact()== null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if (voHomeVisit== null){
        engine.showMessage("Active Home Visit Access record is required to use this screen. ");
        return false;
    }

    if((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null
    && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
    || (voHomeVisit.getClinicalContact() == null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreen(HomeVisitVo voHomeVisit) 
{
    form.getLocalContext().setVisitSummaryVo(null);
    if(voHomeVisit == null) return;

    form.customControlAuthoring().setValue(voHomeVisit.getAuthoringInformation());

    if(voHomeVisit.getHouseDetailsIsNotNull() && voHomeVisit.getHouseDetails().getAddressIsNotNull())
        form.txtAddress().setValue(voHomeVisit.getHouseDetails().getAddress());

    VisitSummaryVo voVisitSummary = voHomeVisit.getVisitSummary();

    if(voVisitSummary!=null)
    {
        form.txtProblems().setValue(voVisitSummary.getProblemsIdentified());
        form.txtRecommendations().setValue(voVisitSummary.getRecommendations());
        form.txtEquipmentReqs().setValue(voVisitSummary.getEquipment());
        form.txtConclusions().setValue(voVisitSummary.getConclusions());
    }

    form.getLocalContext().setHomeVisitVo(voHomeVisit);
    form.getLocalContext().setVisitSummaryVo(voHomeVisit.getVisitSummary());
}
项目:openMAXIMS    文件:HomeVisitAccessImpl.java   
public HomeVisitVo saveHomeVisitAccess(HomeVisitVo homeVisitVo) throws StaleObjectException, UniqueKeyViolationException {
    DomainFactory factory = getDomainFactory(); 

    if (!homeVisitVo.isValidated())
    {
        throw new DomainRuntimeException("This HomeVisitVo has not been validated");
    }

    if(homeVisitVo.getID_HomeVisit() == null)
    {
        if(homeVisitVo.getCareContextIsNotNull())
        {
            HomeVisitVoCollection coll = getHomeVisitVoByCareContext(homeVisitVo.getCareContext());
            if(coll != null && coll.size()>0)
                throw new UniqueKeyViolationException("A Home Visit record already exists for this CareContext. ");
        }
    }
    HomeVisit domHomeVisit = HomeVisitVoAssembler.extractHomeVisit(factory, homeVisitVo);

    factory.save(domHomeVisit);

    return HomeVisitVoAssembler.create(domHomeVisit);
}
项目:openMAXIMS    文件:HomeVisitAccessImpl.java   
public HomeVisitVo getHomeVisitAccByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if(voClinicalContactRef == null || voClinicalContactRef.getID_ClinicalContact() == null)
        throw new DomainRuntimeException("Contact not provided for get call. ");

    DomainFactory factory = getDomainFactory();

    java.util.List home = factory.find("from HomeVisit hv where hv.clinicalContact.id = :contactId", new String[]{"contactId"}, new Object[]{voClinicalContactRef.getID_ClinicalContact()});

    if  ((home != null) && (home.size()>0)){
        HomeVisitVoCollection collHomeVisit  = HomeVisitVoAssembler.createHomeVisitVoCollectionFromHomeVisit(home);
        if(collHomeVisit!=null && collHomeVisit.size()!=0)
            return collHomeVisit.get(0);
    }

    return null;
}
项目:openMAXIMS    文件:HomeVisitAccessImpl.java   
public HomeVisitVo getHomeVisitAccByCareContext(CareContextRefVo voCareContextRef)
{
    if(voCareContextRef == null || voCareContextRef.getID_CareContext() == null)
        throw new DomainRuntimeException("Context not provided for get call. ");

    DomainFactory factory = getDomainFactory();

    java.util.List home = factory.find("from HomeVisit hv where hv.careContext.id = :id and hv.clinicalContact is null", new String[]{"id"}, new Object[]{voCareContextRef.getID_CareContext()});

    //WDEV-13700
    if  (home == null || home.size() == 0)
        return null;

    HomeVisitVoCollection collection = HomeVisitVoAssembler.createHomeVisitVoCollectionFromHomeVisit(home);

    if (collection != null && collection.size() > 0) 
        return collection.get(0);

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if(voHomeVisit==null)
        return false;

    if ((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null 
            && voCurrentClinicalContact.getID_ClinicalContactIsNotNull() && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
            || (voHomeVisit.getClinicalContact() == null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if (voHomeVisit== null){
        engine.showMessage("Active Home Visit Access record is required to use this screen. ");
        return false;
    }

    if((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null && voCurrentClinicalContact.getID_ClinicalContactIsNotNull() 
    && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
    || (voHomeVisit.getClinicalContact()== null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if (voHomeVisit== null){
        engine.showMessage("Active Home Visit Access record is required to use this screen. ");
        return false;
    }

    if((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null
    && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
    || (voHomeVisit.getClinicalContact() == null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreen(HomeVisitVo voHomeVisit) 
{
    form.getLocalContext().setVisitSummaryVo(null);
    if(voHomeVisit == null) return;

    form.customControlAuthoring().setValue(voHomeVisit.getAuthoringInformation());

    if(voHomeVisit.getHouseDetailsIsNotNull() && voHomeVisit.getHouseDetails().getAddressIsNotNull())
        form.txtAddress().setValue(voHomeVisit.getHouseDetails().getAddress());

    VisitSummaryVo voVisitSummary = voHomeVisit.getVisitSummary();

    if(voVisitSummary!=null)
    {
        form.txtProblems().setValue(voVisitSummary.getProblemsIdentified());
        form.txtRecommendations().setValue(voVisitSummary.getRecommendations());
        form.txtEquipmentReqs().setValue(voVisitSummary.getEquipment());
        form.txtConclusions().setValue(voVisitSummary.getConclusions());
    }

    form.getLocalContext().setHomeVisitVo(voHomeVisit);
    form.getLocalContext().setVisitSummaryVo(voHomeVisit.getVisitSummary());
}
项目:openMAXIMS    文件:HomeVisitAccessImpl.java   
public HomeVisitVo saveHomeVisitAccess(HomeVisitVo homeVisitVo) throws StaleObjectException, UniqueKeyViolationException {
    DomainFactory factory = getDomainFactory(); 

    if (!homeVisitVo.isValidated())
    {
        throw new DomainRuntimeException("This HomeVisitVo has not been validated");
    }

    if(homeVisitVo.getID_HomeVisit() == null)
    {
        if(homeVisitVo.getCareContextIsNotNull())
        {
            HomeVisitVoCollection coll = getHomeVisitVoByCareContext(homeVisitVo.getCareContext());
            if(coll != null && coll.size()>0)
                throw new UniqueKeyViolationException("A Home Visit record already exists for this CareContext. ");
        }
    }
    HomeVisit domHomeVisit = HomeVisitVoAssembler.extractHomeVisit(factory, homeVisitVo);

    factory.save(domHomeVisit);

    return HomeVisitVoAssembler.create(domHomeVisit);
}
项目:openMAXIMS    文件:HomeVisitAccessImpl.java   
public HomeVisitVo getHomeVisitAccByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if(voClinicalContactRef == null || voClinicalContactRef.getID_ClinicalContact() == null)
        throw new DomainRuntimeException("Contact not provided for get call. ");

    DomainFactory factory = getDomainFactory();

    java.util.List home = factory.find("from HomeVisit hv where hv.clinicalContact.id = :contactId", new String[]{"contactId"}, new Object[]{voClinicalContactRef.getID_ClinicalContact()});

    if  ((home != null) && (home.size()>0)){
        HomeVisitVoCollection collHomeVisit  = HomeVisitVoAssembler.createHomeVisitVoCollectionFromHomeVisit(home);
        if(collHomeVisit!=null && collHomeVisit.size()!=0)
            return collHomeVisit.get(0);
    }

    return null;
}
项目:openMAXIMS    文件:HomeVisitAccessImpl.java   
public HomeVisitVo getHomeVisitAccByCareContext(CareContextRefVo voCareContextRef)
{
    if(voCareContextRef == null || voCareContextRef.getID_CareContext() == null)
        throw new DomainRuntimeException("Context not provided for get call. ");

    DomainFactory factory = getDomainFactory();

    java.util.List home = factory.find("from HomeVisit hv where hv.careContext.id = :id and hv.clinicalContact is null", new String[]{"id"}, new Object[]{voCareContextRef.getID_CareContext()});

    //WDEV-13700
    if  (home == null || home.size() == 0)
        return null;

    HomeVisitVoCollection collection = HomeVisitVoAssembler.createHomeVisitVoCollectionFromHomeVisit(home);

    if (collection != null && collection.size() > 0) 
        return collection.get(0);

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if(voHomeVisit==null)
        return false;

    if ((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null 
            && voCurrentClinicalContact.getID_ClinicalContactIsNotNull() && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
            || (voHomeVisit.getClinicalContact() == null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if (voHomeVisit== null){
        engine.showMessage("Active Home Visit Access record is required to use this screen. ");
        return false;
    }

    if((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null && voCurrentClinicalContact.getID_ClinicalContactIsNotNull() 
    && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
    || (voHomeVisit.getClinicalContact()== null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean isRecordCurrent()
{
    ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
    HomeVisitVo voHomeVisit = form.getLocalContext().getHomeVisitVo();

    if (voHomeVisit== null){
        engine.showMessage("Active Home Visit Access record is required to use this screen. ");
        return false;
    }

    if((voHomeVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null
    && voCurrentClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
    || (voHomeVisit.getClinicalContact() == null && voCurrentClinicalContact == null))
    {
        return true;
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreen(HomeVisitVo voHomeVisit) 
{
    form.getLocalContext().setVisitSummaryVo(null);
    if(voHomeVisit == null) return;

    form.customControlAuthoring().setValue(voHomeVisit.getAuthoringInformation());

    if(voHomeVisit.getHouseDetailsIsNotNull() && voHomeVisit.getHouseDetails().getAddressIsNotNull())
        form.txtAddress().setValue(voHomeVisit.getHouseDetails().getAddress());

    VisitSummaryVo voVisitSummary = voHomeVisit.getVisitSummary();

    if(voVisitSummary!=null)
    {
        form.txtProblems().setValue(voVisitSummary.getProblemsIdentified());
        form.txtRecommendations().setValue(voVisitSummary.getRecommendations());
        form.txtEquipmentReqs().setValue(voVisitSummary.getEquipment());
        form.txtConclusions().setValue(voVisitSummary.getConclusions());
    }

    form.getLocalContext().setHomeVisitVo(voHomeVisit);
    form.getLocalContext().setVisitSummaryVo(voHomeVisit.getVisitSummary());
}
项目:openmaxims-linux    文件:HomeVisitAccessImpl.java   
public HomeVisitVo saveHomeVisitAccess(HomeVisitVo homeVisitVo) throws StaleObjectException, UniqueKeyViolationException {
    DomainFactory factory = getDomainFactory(); 

    if (!homeVisitVo.isValidated())
    {
        throw new DomainRuntimeException("This HomeVisitVo has not been validated");
    }

    if(homeVisitVo.getID_HomeVisit() == null)
    {
        if(homeVisitVo.getCareContextIsNotNull())
        {
            HomeVisitVoCollection coll = getHomeVisitVoByCareContext(homeVisitVo.getCareContext());
            if(coll != null && coll.size()>0)
                throw new UniqueKeyViolationException("A Home Visit record already exists for this CareContext. ");
        }
    }
    HomeVisit domHomeVisit = HomeVisitVoAssembler.extractHomeVisit(factory, homeVisitVo);

    factory.save(domHomeVisit);

    return HomeVisitVoAssembler.create(domHomeVisit);
}
项目:openmaxims-linux    文件:HomeVisitAccessImpl.java   
public HomeVisitVo getHomeVisitAccByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if(voClinicalContactRef == null || voClinicalContactRef.getID_ClinicalContact() == null)
        throw new DomainRuntimeException("Contact not provided for get call. ");

    DomainFactory factory = getDomainFactory();

    java.util.List home = factory.find("from HomeVisit hv where hv.clinicalContact.id = :contactId", new String[]{"contactId"}, new Object[]{voClinicalContactRef.getID_ClinicalContact()});

    if  ((home != null) && (home.size()>0)){
        HomeVisitVoCollection collHomeVisit  = HomeVisitVoAssembler.createHomeVisitVoCollectionFromHomeVisit(home);
        if(collHomeVisit!=null && collHomeVisit.size()!=0)
            return collHomeVisit.get(0);
    }

    return null;
}
项目:openmaxims-linux    文件:HomeVisitAccessImpl.java   
public HomeVisitVo getHomeVisitAccByCareContext(CareContextRefVo voCareContextRef)
{
    if(voCareContextRef == null || voCareContextRef.getID_CareContext() == null)
        throw new DomainRuntimeException("Context not provided for get call. ");

    DomainFactory factory = getDomainFactory();

    java.util.List home = factory.find("from HomeVisit hv where hv.careContext.id = :id and hv.clinicalContact is null", new String[]{"id"}, new Object[]{voCareContextRef.getID_CareContext()});

    //WDEV-13700
    if  (home == null || home.size() == 0)
        return null;

    HomeVisitVoCollection collection = HomeVisitVoAssembler.createHomeVisitVoCollectionFromHomeVisit(home);

    if (collection != null && collection.size() > 0) 
        return collection.get(0);

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    clear();
    HomeVisitVo voHomeVisit = domain.getHomeVisit(form.getGlobalContext().Therapies.getHomeVisit());
    populateScreenFromData(voHomeVisit);
    resetUpdatedChild();
    if (voHomeVisit== null){
        engine.showMessage("Active Home Visit Access record is required to use this screen. ");
        form.bNew().setVisible(false);
    }
    else
        showButtonsForRecord();
    form.setMode(FormMode.VIEW);//WDEV-13649
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(HomeVisitVo voHomeVisit)
{
    if (voHomeVisit == null)
        return;

    if (voHomeVisit.getAuthoringInformationIsNotNull())
        form.customControlAuthoringInfo().setValue(voHomeVisit.getAuthoringInformation());

    if (voHomeVisit.getHouseDetailsIsNotNull() && voHomeVisit.getHouseDetails().getAddressIsNotNull())
        form.txtAddress().setValue(voHomeVisit.getHouseDetails().getAddress());

    populateChildNodes(domain.listRooms(voHomeVisit));//    WDEV-13649

    form.getLocalContext().setHomeVisitVo(voHomeVisit);
}
项目:AvoinApotti    文件:Logic.java   
private void populateChildCollectionFromGrid(HomeVisitVo voHomeVisit)
{
    if (voHomeVisit.getRooms() == null)
        voHomeVisit.setRooms(new RoomDetailsVoCollection());

    if (form.gridRooms().getRows().size() > 0)
        voHomeVisit.getRooms().clear();

    for (int i = 0; i < form.gridRooms().getRows().size(); i++)
    {
        voHomeVisit.getRooms().add(form.gridRooms().getRows().get(i).getValue());
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean widthAndUnitEntered(HomeVisitVo voHomeVisit)
{
    // for add
    if (voHomeVisit == null)
    {
        if (form.ctnDetails().intDoorWidth().getValue() != null)
        {
            if (form.ctnDetails().cmbUnit().getValue() != null)
                return true;
            else
                return false;
        }
        else
        {
            if (form.ctnDetails().cmbUnit().getValue() != null)
                return false;
        }
    }
    // for save
    else
    {
        for (int i = 0; i < voHomeVisit.getRooms().size(); i++)
        {
            RoomDetailsVo room = voHomeVisit.getRooms().get(i);
            if (room.getDoorWidthIsNotNull())
            {
                if (room.getUnitOfMeasureIsNotNull())
                    return true;
                else
                    return false;
            }
            else
            {
                if (room.getUnitOfMeasureIsNotNull())
                    return false;
            }
        }
    }
    return true;
}
项目:AvoinApotti    文件:HomeVisitAccessImpl.java   
public HomeVisitVo getHomeVisit(HomeVisitRefVo voHomeVisitRef)
{
    if(voHomeVisitRef == null)
        throw new DomainRuntimeException("Invalid Home Visit record to get");

    return HomeVisitVoAssembler.create((HomeVisit) getDomainFactory().getDomainObject(HomeVisit.class, voHomeVisitRef.getID_HomeVisit()));      
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    clear();
    HomeVisitVo voHomeVisit = domain.getHomeVisit(form.getGlobalContext().Therapies.getHomeVisit());
    populateScreenFromData(voHomeVisit);
    resetUpdatedChild();
    if (voHomeVisit== null){
        engine.showMessage("Active Home Visit Access record is required to use this screen. ");
        form.bNew().setVisible(false);
    }
    else
        showButtonsForRecord();
    form.setMode(FormMode.VIEW);//WDEV-13649
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(HomeVisitVo voHomeVisit)
{
    if (voHomeVisit == null)
        return;

    if (voHomeVisit.getAuthoringInformationIsNotNull())
        form.customControlAuthoringInfo().setValue(voHomeVisit.getAuthoringInformation());

    if (voHomeVisit.getHouseDetailsIsNotNull() && voHomeVisit.getHouseDetails().getAddressIsNotNull())
        form.txtAddress().setValue(voHomeVisit.getHouseDetails().getAddress());

    populateChildNodes(domain.listRooms(voHomeVisit));//    WDEV-13649

    form.getLocalContext().setHomeVisitVo(voHomeVisit);
}
项目:openMAXIMS    文件:Logic.java   
private void populateChildCollectionFromGrid(HomeVisitVo voHomeVisit)
{
    if (voHomeVisit.getRooms() == null)
        voHomeVisit.setRooms(new RoomDetailsVoCollection());

    if (form.gridRooms().getRows().size() > 0)
        voHomeVisit.getRooms().clear();

    for (int i = 0; i < form.gridRooms().getRows().size(); i++)
    {
        voHomeVisit.getRooms().add(form.gridRooms().getRows().get(i).getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean widthAndUnitEntered(HomeVisitVo voHomeVisit)
{
    // for add
    if (voHomeVisit == null)
    {
        if (form.ctnDetails().intDoorWidth().getValue() != null)
        {
            if (form.ctnDetails().cmbUnit().getValue() != null)
                return true;
            else
                return false;
        }
        else
        {
            if (form.ctnDetails().cmbUnit().getValue() != null)
                return false;
        }
    }
    // for save
    else
    {
        for (int i = 0; i < voHomeVisit.getRooms().size(); i++)
        {
            RoomDetailsVo room = voHomeVisit.getRooms().get(i);
            if (room.getDoorWidthIsNotNull())
            {
                if (room.getUnitOfMeasureIsNotNull())
                    return true;
                else
                    return false;
            }
            else
            {
                if (room.getUnitOfMeasureIsNotNull())
                    return false;
            }
        }
    }
    return true;
}
项目:openMAXIMS    文件:HomeVisitSummaryImpl.java   
@Override
public HomeVisitVo getHomeVisit(HomeVisitRefVo voHomeVisitRef) {
    if(voHomeVisitRef == null)
        throw new DomainRuntimeException("Invalid Home Visit record to get");

    return HomeVisitVoAssembler.create((HomeVisit) getDomainFactory().getDomainObject(voHomeVisitRef));

}
项目:openMAXIMS    文件:HomeVisitAccessImpl.java   
public HomeVisitVo getHomeVisit(HomeVisitRefVo voHomeVisitRef)
{
    if(voHomeVisitRef == null)
        throw new DomainRuntimeException("Invalid Home Visit record to get");

    return HomeVisitVoAssembler.create((HomeVisit) getDomainFactory().getDomainObject(HomeVisit.class, voHomeVisitRef.getID_HomeVisit()));      
}
项目:openMAXIMS    文件:HomeVisitGeneralImpl.java   
@Override
public HomeVisitVo getHomeVisit(HomeVisitRefVo voHomeVisitRef) {

    if(voHomeVisitRef == null)
        throw new DomainRuntimeException("Invalid Home Visit record to get");

        return HomeVisitVoAssembler.create((HomeVisit) getDomainFactory().getDomainObject(voHomeVisitRef));
}