Java 类ims.core.vo.GP 实例源码

项目:AvoinApotti    文件:Logic.java   
private void loadGPsPractice(GpShortVo vo) 
{
    GP gpVo = domain.getGP(vo);
    if (gpVo.getPracticesIsNotNull() && gpVo.getPractices().size() > 0)
    {
        for (int i = 0 ; i < gpVo.getPractices().size() ; i++)
        {
            if (gpVo.getPractices().get(i).getIsPrimaryPracticeIsNotNull() &&
                gpVo.getPractices().get(i).getIsPrimaryPractice().booleanValue() )
            {
                form.qmbReferringOrg().newRow(gpVo.getPractices().get(i).getPractice(), gpVo.getPractices().get(i).getPractice().getName(), null, null);
                form.qmbReferringOrg().setValue(gpVo.getPractices().get(i).getPractice());
            }
        }
    }
}
项目:AvoinApotti    文件:M02VoMapper.java   
private void linkGPtoPractice(GpToPracticesVoCollection coll, GP gpVo, OrganisationVo orgVo, int i, boolean bSetPrimary) throws HL7Exception,StaleObjectException
{

    orgVo = saveOrganisation(orgVo);        

    GpToPracticesVo link = new GpToPracticesVo();
    link.setGp(gpVo);
    link.setPractice(orgVo);

    if (bSetPrimary) //only HEARTS behaviour will set this
    {
        link.setIsPrimaryPractice(true);
        for (int j = 0; j < coll.size(); j++)
            coll.get(j).setIsPrimaryPractice(false);            
    }
    else if (ConfigFlag.HL7.HEARTS_GP_MODEL.getValue() == false)
    {
        // set the first practice to primary
        if (i == 0)
            link.setIsPrimaryPractice(true);
        else
            link.setIsPrimaryPractice(false);
    }
    coll.add(link);
}
项目:AvoinApotti    文件:GPAdminImpl.java   
public GP getGPByTaxonomyType(String extId, TaxonomyType taxonomyType) 
{
    if (extId == null || taxonomyType == null)
        return null;

    DomainFactory factory = getDomainFactory();
    //String hql = " from Gp g where g.localCode=:pasId";
    String hql = " from Gp g " +
    " join g.codeMappings as cm" +
    " where cm.taxonomyName = :taxType " + 
    " and cm.taxonomyCode = :extId ";

    List gpList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomyType),extId});

    if (gpList != null && gpList.size() > 0)
    {
        Gp gp = (Gp)gpList.get(0);
        return GPAssembler.create(gp);
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void checkIfCheckBoxShouldBeDisplayedAnyway(DischargeReadyToLeaveVo voReady) 
{
    GP voGP = domain.getPatientsGP(form.getGlobalContext().Core.getPatientShort());
    boolean hasEmail = false;
    if (voGP != null && voGP.getCommChannel(ChannelType.EMAIL) != null)
        hasEmail = true;

    DischargeDetailsVo volocalDD = domain.getDischargeDetails(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setCurrentDischargeDetailsVo(volocalDD);

    if ( !hasEmail
        && volocalDD != null
        && volocalDD.getDischargeLetterStatusIsNotNull()
        && volocalDD.getDischargeLetterStatus().equals(DischargeLetterStatus.GENERATED)
        && (voReady.getHasPatientReceivedCopyOfDischarge() == null
                || (voReady.getHasPatientReceivedCopyOfDischargeIsNotNull() &&  ! voReady.getHasPatientReceivedCopyOfDischarge()) ) )
    {
        form.chkLetterGiven().setVisible(true);
        form.lblLetterGiven().setVisible(true);

        if (form.getMode().equals(FormMode.EDIT))
            form.chkLetterGiven().setEnabled(true);
    }

}
项目:AvoinApotti    文件:Logic.java   
private void loadGPsPractice(GpShortVo vo) 
{
    GP gpVo = domain.getGP(vo);
    if (gpVo.getPracticesIsNotNull() && gpVo.getPractices().size() > 0)
    {
        for (int i = 0 ; i < gpVo.getPractices().size() ; i++)
        {
            if (gpVo.getPractices().get(i).getIsPrimaryPracticeIsNotNull() &&
                gpVo.getPractices().get(i).getIsPrimaryPractice().booleanValue() )
            {
                form.qmbRefOrganisation().newRow(gpVo.getPractices().get(i).getPractice(), gpVo.getPractices().get(i).getPractice().getName(), null, null);
                form.qmbRefOrganisation().setValue(gpVo.getPractices().get(i).getPractice());
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadGPsPractice(GpShortVo vo) 
{
    GP gpVo = domain.getGP(vo);
    if (gpVo.getPracticesIsNotNull() && gpVo.getPractices().size() > 0)
    {
        for (int i = 0 ; i < gpVo.getPractices().size() ; i++)
        {
            if (gpVo.getPractices().get(i).getIsPrimaryPracticeIsNotNull() &&
                gpVo.getPractices().get(i).getIsPrimaryPractice().booleanValue() )
            {
                form.qmbReferringOrg().newRow(gpVo.getPractices().get(i).getPractice(), gpVo.getPractices().get(i).getPractice().getName(), null, null);
                form.qmbReferringOrg().setValue(gpVo.getPractices().get(i).getPractice());
            }
        }
    }
}
项目:openMAXIMS    文件:M02VoMapper.java   
private void linkGPtoPractice(GpToPracticesVoCollection coll, GP gpVo, OrganisationVo orgVo, int i, boolean bSetPrimary) throws HL7Exception,StaleObjectException
{

    orgVo = saveOrganisation(orgVo);        

    GpToPracticesVo link = new GpToPracticesVo();
    link.setGp(gpVo);
    link.setPractice(orgVo);

    if (bSetPrimary) //only HEARTS behaviour will set this
    {
        link.setIsPrimaryPractice(true);
        for (int j = 0; j < coll.size(); j++)
            coll.get(j).setIsPrimaryPractice(false);            
    }
    else if (ConfigFlag.HL7.HEARTS_GP_MODEL.getValue() == false)
    {
        // set the first practice to primary
        if (i == 0)
            link.setIsPrimaryPractice(true);
        else
            link.setIsPrimaryPractice(false);
    }
    coll.add(link);
}
项目:openMAXIMS    文件:GPAdminImpl.java   
public GP getGPByTaxonomyType(String extId, TaxonomyType taxonomyType) 
{
    if (extId == null || taxonomyType == null)
        return null;

    DomainFactory factory = getDomainFactory();
    //String hql = " from Gp g where g.localCode=:pasId";
    String hql = " from Gp g " +
    " join g.codeMappings as cm" +
    " where cm.taxonomyName = :taxType " + 
    " and cm.taxonomyCode = :extId ";

    List gpList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomyType),extId});

    if (gpList != null && gpList.size() > 0)
    {
        Gp gp = (Gp)gpList.get(0);
        return GPAssembler.create(gp);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void checkIfCheckBoxShouldBeDisplayedAnyway(DischargeReadyToLeaveVo voReady) 
{
    GP voGP = domain.getPatientsGP(form.getGlobalContext().Core.getPatientShort());
    boolean hasEmail = false;
    if (voGP != null && voGP.getCommChannel(ChannelType.EMAIL) != null)
        hasEmail = true;

    DischargeDetailsVo volocalDD = domain.getDischargeDetails(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setCurrentDischargeDetailsVo(volocalDD);

    if ( !hasEmail
        && volocalDD != null
        && volocalDD.getDischargeLetterStatusIsNotNull()
        && volocalDD.getDischargeLetterStatus().equals(DischargeLetterStatus.GENERATED)
        && (voReady.getHasPatientReceivedCopyOfDischarge() == null
                || (voReady.getHasPatientReceivedCopyOfDischargeIsNotNull() &&  ! voReady.getHasPatientReceivedCopyOfDischarge()) ) )
    {
        form.chkLetterGiven().setVisible(true);
        form.lblLetterGiven().setVisible(true);

        if (form.getMode().equals(FormMode.EDIT))
            form.chkLetterGiven().setEnabled(true);
    }

}
项目:openMAXIMS    文件:Logic.java   
private void loadGPsPractice(GpShortVo vo) 
{
    GP gpVo = domain.getGP(vo);
    if (gpVo.getPracticesIsNotNull() && gpVo.getPractices().size() > 0)
    {
        for (int i = 0 ; i < gpVo.getPractices().size() ; i++)
        {
            if (gpVo.getPractices().get(i).getIsPrimaryPracticeIsNotNull() &&
                gpVo.getPractices().get(i).getIsPrimaryPractice().booleanValue() )
            {
                form.qmbRefOrganisation().newRow(gpVo.getPractices().get(i).getPractice(), gpVo.getPractices().get(i).getPractice().getName(), null, null);
                form.qmbRefOrganisation().setValue(gpVo.getPractices().get(i).getPractice());
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadGPsPractice(GpShortVo vo) 
{
    GP gpVo = domain.getGP(vo);
    if (gpVo.getPracticesIsNotNull() && gpVo.getPractices().size() > 0)
    {
        for (int i = 0 ; i < gpVo.getPractices().size() ; i++)
        {
            if (gpVo.getPractices().get(i).getIsPrimaryPracticeIsNotNull() &&
                gpVo.getPractices().get(i).getIsPrimaryPractice().booleanValue() )
            {
                form.qmbReferringOrg().newRow(gpVo.getPractices().get(i).getPractice(), gpVo.getPractices().get(i).getPractice().getName(), null, null);
                form.qmbReferringOrg().setValue(gpVo.getPractices().get(i).getPractice());
            }
        }
    }
}
项目:openMAXIMS    文件:M02VoMapper.java   
private void linkGPtoPractice(GpToPracticesVoCollection coll, GP gpVo, OrganisationVo orgVo, int i, boolean bSetPrimary) throws HL7Exception,StaleObjectException
{

    orgVo = saveOrganisation(orgVo);        

    GpToPracticesVo link = new GpToPracticesVo();
    link.setGp(gpVo);
    link.setPractice(orgVo);

    if (bSetPrimary) //only HEARTS behaviour will set this
    {
        link.setIsPrimaryPractice(true);
        for (int j = 0; j < coll.size(); j++)
            coll.get(j).setIsPrimaryPractice(false);            
    }
    else if (ConfigFlag.HL7.HEARTS_GP_MODEL.getValue() == false)
    {
        // set the first practice to primary
        if (i == 0)
            link.setIsPrimaryPractice(true);
        else
            link.setIsPrimaryPractice(false);
    }
    coll.add(link);
}
项目:openMAXIMS    文件:GPAdminImpl.java   
public GP getGPByTaxonomyType(String extId, TaxonomyType taxonomyType) 
{
    if (extId == null || taxonomyType == null)
        return null;

    DomainFactory factory = getDomainFactory();
    //String hql = " from Gp g where g.localCode=:pasId";
    String hql = " from Gp g " +
    " join g.codeMappings as cm" +
    " where cm.taxonomyName = :taxType " + 
    " and cm.taxonomyCode = :extId ";

    List gpList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomyType),extId});

    if (gpList != null && gpList.size() > 0)
    {
        Gp gp = (Gp)gpList.get(0);
        return GPAssembler.create(gp);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void checkIfCheckBoxShouldBeDisplayedAnyway(DischargeReadyToLeaveVo voReady) 
{
    GP voGP = domain.getPatientsGP(form.getGlobalContext().Core.getPatientShort());
    boolean hasEmail = false;
    if (voGP != null && voGP.getCommChannel(ChannelType.EMAIL) != null)
        hasEmail = true;

    DischargeDetailsVo volocalDD = domain.getDischargeDetails(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setCurrentDischargeDetailsVo(volocalDD);

    if ( !hasEmail
        && volocalDD != null
        && volocalDD.getDischargeLetterStatusIsNotNull()
        && volocalDD.getDischargeLetterStatus().equals(DischargeLetterStatus.GENERATED)
        && (voReady.getHasPatientReceivedCopyOfDischarge() == null
                || (voReady.getHasPatientReceivedCopyOfDischargeIsNotNull() &&  ! voReady.getHasPatientReceivedCopyOfDischarge()) ) )
    {
        form.chkLetterGiven().setVisible(true);
        form.lblLetterGiven().setVisible(true);

        if (form.getMode().equals(FormMode.EDIT))
            form.chkLetterGiven().setEnabled(true);
    }

}
项目:openMAXIMS    文件:Logic.java   
private void loadGPsPractice(GpShortVo vo) 
{
    GP gpVo = domain.getGP(vo);
    if (gpVo.getPracticesIsNotNull() && gpVo.getPractices().size() > 0)
    {
        for (int i = 0 ; i < gpVo.getPractices().size() ; i++)
        {
            if (gpVo.getPractices().get(i).getIsPrimaryPracticeIsNotNull() &&
                gpVo.getPractices().get(i).getIsPrimaryPractice().booleanValue() )
            {
                form.qmbRefOrganisation().newRow(gpVo.getPractices().get(i).getPractice(), gpVo.getPractices().get(i).getPractice().getName(), null, null);
                form.qmbRefOrganisation().setValue(gpVo.getPractices().get(i).getPractice());
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void loadGPsPractice(GpShortVo vo) 
{
    GP gpVo = domain.getGP(vo);
    if (gpVo.getPracticesIsNotNull() && gpVo.getPractices().size() > 0)
    {
        for (int i = 0 ; i < gpVo.getPractices().size() ; i++)
        {
            if (gpVo.getPractices().get(i).getIsPrimaryPracticeIsNotNull() &&
                gpVo.getPractices().get(i).getIsPrimaryPractice().booleanValue() )
            {
                form.qmbReferringOrg().newRow(gpVo.getPractices().get(i).getPractice(), gpVo.getPractices().get(i).getPractice().getName(), null, null);
                form.qmbReferringOrg().setValue(gpVo.getPractices().get(i).getPractice());
            }
        }
    }
}
项目:openmaxims-linux    文件:M02VoMapper.java   
private void linkGPtoPractice(GpToPracticesVoCollection coll, GP gpVo, OrganisationVo orgVo, int i, boolean bSetPrimary) throws HL7Exception,StaleObjectException
{

    orgVo = saveOrganisation(orgVo);        

    GpToPracticesVo link = new GpToPracticesVo();
    link.setGp(gpVo);
    link.setPractice(orgVo);

    if (bSetPrimary) //only HEARTS behaviour will set this
    {
        link.setIsPrimaryPractice(true);
        for (int j = 0; j < coll.size(); j++)
            coll.get(j).setIsPrimaryPractice(false);            
    }
    else if (ConfigFlag.HL7.HEARTS_GP_MODEL.getValue() == false)
    {
        // set the first practice to primary
        if (i == 0)
            link.setIsPrimaryPractice(true);
        else
            link.setIsPrimaryPractice(false);
    }
    coll.add(link);
}
项目:openmaxims-linux    文件:GPAdminImpl.java   
public GP getGPByTaxonomyType(String extId, TaxonomyType taxonomyType) 
{
    if (extId == null || taxonomyType == null)
        return null;

    DomainFactory factory = getDomainFactory();
    //String hql = " from Gp g where g.localCode=:pasId";
    String hql = " from Gp g " +
    " join g.codeMappings as cm" +
    " where cm.taxonomyName = :taxType " + 
    " and cm.taxonomyCode = :extId ";

    List gpList = factory.find(hql,new String[]{"taxType", "extId"}, new Object[]{getDomLookup(taxonomyType),extId});

    if (gpList != null && gpList.size() > 0)
    {
        Gp gp = (Gp)gpList.get(0);
        return GPAssembler.create(gp);
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void checkIfCheckBoxShouldBeDisplayedAnyway(DischargeReadyToLeaveVo voReady) 
{
    GP voGP = domain.getPatientsGP(form.getGlobalContext().Core.getPatientShort());
    boolean hasEmail = false;
    if (voGP != null && voGP.getCommChannel(ChannelType.EMAIL) != null)
        hasEmail = true;

    DischargeDetailsVo volocalDD = domain.getDischargeDetails(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setCurrentDischargeDetailsVo(volocalDD);

    if ( !hasEmail
        && volocalDD != null
        && volocalDD.getDischargeLetterStatusIsNotNull()
        && volocalDD.getDischargeLetterStatus().equals(DischargeLetterStatus.GENERATED)
        && (voReady.getHasPatientReceivedCopyOfDischarge() == null
                || (voReady.getHasPatientReceivedCopyOfDischargeIsNotNull() &&  ! voReady.getHasPatientReceivedCopyOfDischarge()) ) )
    {
        form.chkLetterGiven().setVisible(true);
        form.lblLetterGiven().setVisible(true);

        if (form.getMode().equals(FormMode.EDIT))
            form.chkLetterGiven().setEnabled(true);
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void loadGPsPractice(GpShortVo vo) 
{
    GP gpVo = domain.getGP(vo);
    if (gpVo.getPracticesIsNotNull() && gpVo.getPractices().size() > 0)
    {
        for (int i = 0 ; i < gpVo.getPractices().size() ; i++)
        {
            if (gpVo.getPractices().get(i).getIsPrimaryPracticeIsNotNull() &&
                gpVo.getPractices().get(i).getIsPrimaryPractice().booleanValue() )
            {
                form.qmbRefOrganisation().newRow(gpVo.getPractices().get(i).getPractice(), gpVo.getPractices().get(i).getPractice().getName(), null, null);
                form.qmbRefOrganisation().setValue(gpVo.getPractices().get(i).getPractice());
            }
        }
    }
}
项目:AvoinApotti    文件:DemographicsImpl.java   
private GP saveGP(GP voGP) throws StaleObjectException, UniqueKeyViolationException 
{
    String[] arrErrors = null;
    if (voGP != null)
        arrErrors = voGP.validate();

    if (arrErrors != null)
        return null;

    GPAdmin impl = (GPAdmin) getDomainImpl(GPAdminImpl.class);
    return impl.saveGp(voGP);

}
项目:AvoinApotti    文件:Logic.java   
public GP getFullGpVo()
{
    GpLiteVo voGpLite = getSelectedValue();
    if(voGpLite != null)
        return domain.getGpFull(voGpLite);

    return null;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Gets the value of the custom control grid selection. If not null, populates the instance controls. 
 * @param null
 * @return null
 */
private void getSelectedGP()
{
    GP voGp = form.customControlGpSearch().getFullGpVo();
    if (voGp != null)
    {
        form.getLocalContext().setGPVo(voGp);
        populateInstanceControl(voGp);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControl(GP gp)
{
    clearInstanceControls();
    populateScreenFromData(gp);

    form.ctnGPDetails().lyrGPDetails().showtabGPDetails();
    updateControlsState();
}
项目:AvoinApotti    文件:Logic.java   
/**
 * The GP parameter is updated to match what is on screen and returned. 
 * @param GP
 * @return GP
 */
protected GP populateDataFromScreen(GP value)
{       
    value = super.populateDataFromScreen(value);    

    value.setName(getName());
    value.setStatus(form.ctnGPDetails().lyrGPDetails().tabGPDetails().cmbGPStatus().getValue());
    value.setCodeMappings(getCodeMappings());
    value.setCommChannels(getCommChannels());
    value.setPractices(getPractices());
    return value;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Populated the screen based on the GP parameter.
 * @param GP
 * @return null
 */
protected void populateScreenFromData(GP value)
{
    if (value == null)
        return;

    clearInstanceControls();    

    form.ctnGPDetails().lyrGPDetails().tabGPDetails().cmbGPStatus().setValue(value.getStatusIsNotNull() ? value.getStatus() : null);
    populateName(value.getName());
    populatePractices(value.getPractices());        
    populateMappingsGrid(value.getCodeMappings());
    populateContactsGrid(value.getCommChannels());
}
项目:AvoinApotti    文件:GPAdminImpl.java   
public GP saveGp(GP gp) throws StaleObjectException, UniqueKeyViolationException
{
    if(!gp.isValidated()) 
        throw new DomainRuntimeException("Gp Not Validated");

    DomainFactory factory = getDomainFactory();

    gp.getName().setUppers();

    Gp doGp = GPAssembler.extractGp(factory, gp);
    Iterator it = doGp.getPractices().iterator();
    while(it.hasNext())
    {
        GpToPractice gpPract = (GpToPractice) it.next();
        gpPract.setGp(doGp);
    }
    try
    {
        factory.save(doGp);
    }
    catch (UnqViolationUncheckedException e)
    {
        String dupMessage = Keywords.checkDuplicateTaxonomy(factory, doGp, "codeMappings", gp.getCodeMappings(), "getName");
        if(dupMessage != null)
            throw new UniqueKeyViolationException(dupMessage);
    }
    return GPAssembler.create(doGp);
}
项目:AvoinApotti    文件:GPAdminImpl.java   
public GP getGP(Integer id) 
{
    DomainFactory factory = getDomainFactory();

    Gp doGP = (Gp) factory.getDomainObject(Gp.class, id);
    return GPAssembler.create(doGP);
}
项目:AvoinApotti    文件:GPSearchImpl.java   
public GP getGpFull(GpRefVo gpRefVo)
{
    if(gpRefVo == null)
        throw new CodingRuntimeException("Cannot get GP for null GpRefVo");
    Gp doGp = (Gp)getDomainFactory().getDomainObject(Gp.class, gpRefVo.getID_Gp());

    return GPAssembler.create(doGp);        
}
项目:AvoinApotti    文件:DischargeSummaryScheduleSTHKFormImpl.java   
public GP getGPViaCareContext(CareContextRefVo careContext) 
{
    DomainFactory factory = getDomainFactory();
    List lst = factory.find("select gp from CareContext as cc left join cc.episodeOfCare as eoc left join eoc.careSpell as cs left join cs.patient as p left join p.gp as gp where (cc.id = :idCareContext)", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    if (lst != null && lst.size() > 0)
        return GPAssembler.create((Gp) lst.get(0));

    return null;
}
项目:AvoinApotti    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public GP getPatientsGP(PatientRefVo patRefVo) 
{
    DomainFactory factory = getDomainFactory();
    List lst = factory.find("select gp from Patient p where p.id = :patID", new String[]{"patID"}, new Object[]{patRefVo.getID_Patient()});
    if (lst != null && lst.size() > 0)
        return GPAssembler.create((Gp) lst.get(0));

    return null;
}
项目:openMAXIMS    文件:CorrespondenceDetailsImpl.java   
public GpShortVoCollection listReferralGps(GP voGpFilter) 
{
    DomainFactory factory = getDomainFactory();
    String andStr = " ";
    StringBuffer clause = new StringBuffer();

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    if (voGpFilter.getNameIsNotNull())
    {
        if (voGpFilter.getName().getForenameIsNotNull())
        {
            clause.append(" gp.name.upperForename like :forename");
            names.add("forename");
            values.add("%" + voGpFilter.getName().getForename().toUpperCase() + "%");       
            andStr = " and ";
        }

        if (voGpFilter.getName().getSurnameIsNotNull())
        {
            clause.append(andStr + " gp.name.upperSurname like :surname");
            names.add("surname");
            values.add("%" + voGpFilter.getName().getSurname().toUpperCase() + "%");        
            andStr = " and ";
        }
    }

    if (voGpFilter.getPracticesIsNotNull())
        {
        if (voGpFilter.getPractices() != null)
        {
            if (voGpFilter.getPractices().get(0).getPractice().getAddress().getLine1() != null && voGpFilter.getPractices().get(0).getPractice().getAddress().getLine1().length() > 0)
            {
                clause.append(andStr + " gp.id = Pract.gp.id and (upper(Pract.practice.address.line1) like :partialAddress ");
                clause.append(" or upper(Pract.practice.address.line2) like :partialAddress");
                clause.append(" or upper(Pract.practice.address.line3) like :partialAddress");
                clause.append(" or upper(Pract.practice.address.line4) like :partialAddress");
                clause.append(" or upper(Pract.practice.address.line5) like :partialAddress )");
                //clause.append(" gp.id = Pract.gp.id and Pract.practice.address.line1 like :partialAddress ");

                names.add("partialAddress");
                values.add("%" + voGpFilter.getPractices().get(0).getPractice().getAddress().getLine1().toUpperCase() + "%");
                andStr = " and ";
            }
        }
       }

    String hql = "select distinct gp from Gp gp, GpToPractice Pract where ";

    hql += clause.toString();
    List gps = factory.find(hql,names,values);


    return GpShortVoAssembler.createGpShortVoCollectionFromGp(gps).sort();
}
项目:openMAXIMS    文件:DemographicsImpl.java   
private GP saveGP(GP voGP) throws StaleObjectException, UniqueKeyViolationException 
{
    String[] arrErrors = null;
    if (voGP != null)
        arrErrors = voGP.validate();

    if (arrErrors != null)
        return null;

    GPAdmin impl = (GPAdmin) getDomainImpl(GPAdminImpl.class);
    return impl.saveGp(voGP);

}
项目:openMAXIMS    文件:PDSDemographicsImpl.java   
private GP saveGP(GP voGP) throws StaleObjectException, UniqueKeyViolationException 
{
    String[] arrErrors = null;
    if (voGP != null)
        arrErrors = voGP.validate();

    if (arrErrors != null)
        return null;

    GPAdmin impl = (GPAdmin) getDomainImpl(GPAdminImpl.class);
    return impl.saveGp(voGP);

}
项目:openMAXIMS    文件:M02VoMapper.java   
private GP updateGpStatus(GP gp)
{
    if(gp!=null)
    {
        gp.setStatus(GPStatus.INACTIVE);
        String gMCCode = gp.getNationalCode();
        if(gp.getPracticesIsNotNull()&&gp.getPractices().size()>0 &&gMCCode!=null)
        {
            for (GpToPracticesVo gpToPracticesVo : gp.getPractices())
            {
                if(gpToPracticesVo.getPracticeIsNotNull()&&gpToPracticesVo.getPractice().getIsActive()!=null&&gpToPracticesVo.getPractice().getIsActive())
                {
                    if(gpToPracticesVo.getPractice().getLocationSitesIsNotNull()&&gpToPracticesVo.getPractice().getLocationSites().size()>0)
                    {
                        for (LocSiteVo surgery : gpToPracticesVo.getPractice().getLocationSites()) {
                            if(surgery.getIsActiveIsNotNull() && 
                                    surgery.getIsActive().equals(Boolean.TRUE)&&
                                    surgery.getPasCode()!=null&&
                                    gMCCode!=null&&
                                    gMCCode.trim()!=null&&
                                    surgery.getPasCode().toUpperCase().matches("\\S+_"+gMCCode.trim().toUpperCase()+"_\\S+")) //http://jira/browse/WDEV-15535 changed filter from PAS to GMC 
                            {
                                gp.setStatus(GPStatus.ACTIVE);
                                break;
                            }
                        }
                    }
                }
            }
        }
    }
    return gp;
}
项目:openMAXIMS    文件:Logic.java   
protected void onDynGrdGpsRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
    enableContextMenu();
    if (row.getValue() instanceof GpLiteVo) 
        setSelectedRecordType(GPSelectedRecordType.GP);
    else if (row.getValue() instanceof GpLiteToPracticeLiteVo) 
        setSelectedRecordType(GPSelectedRecordType.PRACTICE);
    else if (row.getValue() instanceof LocShortVo) 
        setSelectedRecordType(GPSelectedRecordType.SURGERY);
    else
        setSelectedRecordType(GPSelectedRecordType.NONE); 
    setActionAndFireEvent(GPAction.SELECT);
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Gets the value of the custom control grid selection. If not null, populates the instance controls. 
 * @param null
 * @return null
 */
private void getSelectedGP()
{
    GP voGp = form.customControlGpSearch().getFullGpVo();
    if (voGp != null)
    {
        form.getLocalContext().setGPVo(voGp);
        populateInstanceControl(voGp);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControl(GP gp)
{
    clearInstanceControls();
    populateScreenFromData(gp);

    form.ctnGPDetails().lyrGPDetails().showtabGPDetails();
    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
/**
 * The GP parameter is updated to match what is on screen and returned. 
 * @param GP
 * @return GP
 */
protected GP populateDataFromScreen(GP value)
{       
    value = super.populateDataFromScreen(value);    

    value.setName(getName());
    value.setStatus(form.ctnGPDetails().lyrGPDetails().tabGPDetails().cmbGPStatus().getValue());
    value.setCodeMappings(getCodeMappings());
    value.setCommChannels(getCommChannels());
    value.setPractices(getPractices());
    return value;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Populated the screen based on the GP parameter.
 * @param GP
 * @return null
 */
protected void populateScreenFromData(GP value)
{
    if (value == null)
        return;

    clearInstanceControls();    

    form.ctnGPDetails().lyrGPDetails().tabGPDetails().cmbGPStatus().setValue(value.getStatusIsNotNull() ? value.getStatus() : null);
    populateName(value.getName());
    populatePractices(value.getPractices());        
    populateMappingsGrid(value.getCodeMappings());
    populateContactsGrid(value.getCommChannels());
}