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

项目:AvoinApotti    文件:Logic.java   
private void overlayClinicAccess(ClinicAccessVoCollection voCollClinicAccess)
{
    for (int i = 0; voCollClinicAccess != null && i < voCollClinicAccess.size();i++) 
    {
        for (int j = 0; j < form.grdClinic().getRows().size(); j++) 
        {
            if (form.grdClinic().getRows().get(j).getValue() instanceof ClinicVo)
            {
                ClinicVo voClinic = (ClinicVo) form.grdClinic().getRows().get(j).getValue();
                if (voCollClinicAccess.get(i).getClinic().getID_Clinic().intValue()  == voClinic.getID_Clinic().intValue())
                {                   
                    form.grdClinic().getRows().get(j).setValue(voCollClinicAccess.get(i));                                              
                    form.grdClinic().getRows().get(j).setcolAccess(voCollClinicAccess.get(i).getAccessRight());
                    break;                                              
                }
            }
        }
    }
}
项目:AvoinApotti    文件:M05VoMapper.java   
private void saveClinic(ClinicVo clinic) throws HL7Exception
{
    try
    {
        String[] errors = clinic.validate();
        if (errors != null)
        {
            throw new HL7Exception("Validation of Clinic failed. " + VoMapper.toDisplayString(errors));             
        }
        orgLoc.saveClinic(clinic);
    }
    catch (StaleObjectException e)
    {
        LOG.error("StaleObjectException occurred saving clinic - " + e.getMessage(), e);
        throw new HL7Exception("Clinic data has been updated by another user/process - please try again", e);
    }

}
项目:AvoinApotti    文件:Logic.java   
/**
 * Default in the search critera based on the details passed in the parameter
 * If the parameter is not null retrieve any matching records and populate the tree 
 * @param ClinicVo
 */  
private void populateSearchCriteriaAndSearch(ClinicVo voClinic)
{
    if (voClinic != null && voClinic.getID_ClinicIsNotNull())
    {
        form.cmbSearchLoc().setValue(voClinic.getClinicLocation());

        //WDEV-11914
        loadSearchOutpatientDepartment(form.cmbSearchLoc().getValue());

        form.txtSearchName().setValue(voClinic.getClinicName());
        form.chkSearchAciveOnly().setValue(voClinic.getIsActive());

        if (voClinic.getID_ClinicIsNotNull() && (voClinic.getClinicNameIsNotNull() || voClinic.getMapping(TaxonomyType.PAS) != null || voClinic.getClinicLocationIsNotNull()))
        {
            search();
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
/**
 * Populate the instance details fields based on the fields contained in the paramater ClinicVo
 * @param ClinicVo
 */
private void populateInstanceControl(ClinicVo voClinic)
{
    if(voClinic == null)
        clearInstanceDetails();
    else
    {
        form.cmbClinicLoc().setValue(voClinic.getClinicLocation());

        //WDEV-11914 - starts here
        loadOutpatientDepartment(form.cmbClinicLoc().getValue());
        form.cmbOutpatient().setValue(voClinic.getOutpatientDept());
        //WDEV-11914 - ends here

        form.txtName().setValue(voClinic.getClinicName());  
        form.chkActive().setValue(voClinic.getIsActive());
    }       
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Event fired when a selection is made on the tree
 * @param TreeNode node
 * @throws PresentationLogicException
 */
protected void onTreClinicsTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException
{
    form.TaxonomyMappings().setComponentMode(FormMode.VIEW);
    clearInstanceDetails();
    form.getLocalContext().setSelectedRecord(null);

    if (node.getValue() != null && node.getValue() instanceof ClinicLiteVo)
    {
        ClinicVo clin = domain.getClinic((ClinicLiteVo)node.getValue());
        form.getLocalContext().setSelectedRecord(clin);
        populateInstanceControl(clin);
        form.TaxonomyMappings().setValue(clin.getCodeMappings());
    }
    updateControlsState();
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Creates a clinic node in the tree for the value passed in
 * If the clinic is inactive set the colour of the text to red
 * @see createClinicNode(TreeNode nodeLoc, ClinicVo voClinic)
 * @param TreeNode nodeLoc
 * @param ClinicVo voClinic
 */
private void createClinicNode(ClinicVo voClinic)
{
    TreeNode nodeLoc = form.treClinics().getNodeByValue(voClinic.getClinicLocation());

    // Add clinic to location (as child node)

    // WDEV-11914 - starts here
    if (nodeLoc == null || voClinic == null)
        return;

    String clinicName = voClinic.getClinicName();

    if (voClinic.getOutpatientDeptIsNotNull())
        clinicName += " - " + voClinic.getOutpatientDept().getName();
    // WDEV-11914 - ends here

    TreeNode clinNode = nodeLoc.getNodes().add(voClinic, clinicName); // WDEV-11914
    clinNode.setExpandedImage(form.getImages().Admin.Activity);
    clinNode.setCollapsedImage(form.getImages().Admin.Activity);
    if (voClinic.getIsActiveIsNotNull() && !voClinic.getIsActive())
    {
        clinNode.setTextColor(Color.Red);
    }

}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public ClinicVo getClinicByTaxonomyCode(TaxonomyType type,String taxCode)
{
    DomainFactory factory = getDomainFactory();
    String hql="select clinic from Clinic as clinic left join clinic.codeMappings as codeMappings " +
            "where (codeMappings.taxonomyCode = :code and codeMappings.taxonomyName =:name )";
    List clinics=factory.find(hql, new String []{"code", "name"},new Object []{taxCode, getDomLookup(type)});
    if (clinics.size()!=0)
    {
        Clinic clinic=(Clinic)clinics.get(0);
        return ClinicVoAssembler.create(clinic);
    }
    else
    {
        return null;
    }
}
项目:AvoinApotti    文件:ClinicAdminImpl.java   
public ClinicVo saveClinic(ClinicVo voClinic) throws StaleObjectException, UniqueKeyViolationException
{
    if(voClinic == null)
        throw new CodingRuntimeException("This Clinic Value Object is null");
    if(!voClinic.isValidated())
        throw new DomainRuntimeException("This Clinic Value Object has not been validated");

    DomainFactory factory = getDomainFactory();     
    Clinic domClinic = ClinicVoAssembler.extractClinic(factory,voClinic);
    domClinic.setUpperNames();

    try
    {
        factory.save(domClinic);
    }
    catch (UnqViolationUncheckedException e)
    {   
        throw new UniqueKeyViolationException("This Clinic Code already exists. ", e);
    }
    return ClinicVoAssembler.create(domClinic);
}
项目:AvoinApotti    文件:ClinicAdminImpl.java   
public ClinicVo getClinicByPASCode(String clinicCode)
{
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin join clin.codeMappings map where map.taxonomyCode = :clinicCode and map.taxonomyName = :type");
    names.add("clinicCode");
    values.add(clinicCode);
    names.add("type");
    values.add(getDomLookup(TaxonomyType.PAS));
    List clinics = factory.find(hql.toString(), names, values, 1000);
    if (clinics != null && clinics.size() > 0)
        return ClinicVoAssembler.create((Clinic) clinics.get(0));

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void overlayClinicAccess(ClinicAccessVoCollection voCollClinicAccess)
{
    for (int i = 0; voCollClinicAccess != null && i < voCollClinicAccess.size();i++) 
    {
        for (int j = 0; j < form.grdClinic().getRows().size(); j++) 
        {
            if (form.grdClinic().getRows().get(j).getValue() instanceof ClinicVo)
            {
                ClinicVo voClinic = (ClinicVo) form.grdClinic().getRows().get(j).getValue();
                if (voCollClinicAccess.get(i).getClinic().getID_Clinic().intValue()  == voClinic.getID_Clinic().intValue())
                {                   
                    form.grdClinic().getRows().get(j).setValue(voCollClinicAccess.get(i));                                              
                    form.grdClinic().getRows().get(j).setcolAccess(voCollClinicAccess.get(i).getAccessRight());
                    break;                                              
                }
            }
        }
    }
}
项目:openMAXIMS    文件:M05VoMapper.java   
private void saveClinic(ClinicVo clinic) throws HL7Exception
{
    try
    {
        String[] errors = clinic.validate();
        if (errors != null)
        {
            throw new HL7Exception("Validation of Clinic failed. " + VoMapper.toDisplayString(errors));             
        }
        orgLoc.saveClinic(clinic);
    }
    catch (StaleObjectException e)
    {
        LOG.error("StaleObjectException occurred saving clinic - " + e.getMessage(), e);
        throw new HL7Exception("Clinic data has been updated by another user/process - please try again", e);
    }

}
项目:openMAXIMS    文件:Logic.java   
/**
 * Default in the search critera based on the details passed in the parameter
 * If the parameter is not null retrieve any matching records and populate the tree 
 * @param ClinicVo
 */  
private void populateSearchCriteriaAndSearch(ClinicVo voClinic)
{
    if (voClinic != null && voClinic.getID_ClinicIsNotNull())
    {
        form.cmbSearchLoc().setValue(voClinic.getClinicLocation());

        //WDEV-11914
        loadSearchOutpatientDepartment(form.cmbSearchLoc().getValue());

        form.txtSearchName().setValue(voClinic.getClinicName());
        form.chkSearchAciveOnly().setValue(voClinic.getIsActive());

        if (voClinic.getID_ClinicIsNotNull() && (voClinic.getClinicNameIsNotNull() || voClinic.getMapping(TaxonomyType.PAS) != null || voClinic.getClinicLocationIsNotNull()))
        {
            search();
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
/**
 * Populate the instance details fields based on the fields contained in the paramater ClinicVo
 * @param ClinicVo
 */
private void populateInstanceControl(ClinicVo voClinic)
{
    if(voClinic == null)
        clearInstanceDetails();
    else
    {
        form.cmbClinicLoc().setValue(voClinic.getClinicLocation());

        //WDEV-11914 - starts here
        loadOutpatientDepartment(form.cmbClinicLoc().getValue());
        form.cmbOutpatient().setValue(voClinic.getOutpatientDept());
        //WDEV-11914 - ends here

        form.txtName().setValue(voClinic.getClinicName());  
        form.chkActive().setValue(voClinic.getIsActive());
    }       
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Event fired when a selection is made on the tree
 * @param TreeNode node
 * @throws PresentationLogicException
 */
protected void onTreClinicsTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException
{
    form.TaxonomyMappings().setComponentMode(FormMode.VIEW);
    clearInstanceDetails();
    form.getLocalContext().setSelectedRecord(null);

    if (node.getValue() != null && node.getValue() instanceof ClinicLiteVo)
    {
        ClinicVo clin = domain.getClinic((ClinicLiteVo)node.getValue());
        form.getLocalContext().setSelectedRecord(clin);
        populateInstanceControl(clin);
        form.TaxonomyMappings().setValue(clin.getCodeMappings());
    }
    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Creates a clinic node in the tree for the value passed in
 * If the clinic is inactive set the colour of the text to red
 * @see createClinicNode(TreeNode nodeLoc, ClinicVo voClinic)
 * @param TreeNode nodeLoc
 * @param ClinicVo voClinic
 */
private void createClinicNode(ClinicVo voClinic)
{
    TreeNode nodeLoc = form.treClinics().getNodeByValue(voClinic.getClinicLocation());

    // Add clinic to location (as child node)

    // WDEV-11914 - starts here
    if (nodeLoc == null || voClinic == null)
        return;

    String clinicName = voClinic.getClinicName();

    if (voClinic.getOutpatientDeptIsNotNull())
        clinicName += " - " + voClinic.getOutpatientDept().getName();
    // WDEV-11914 - ends here

    TreeNode clinNode = nodeLoc.getNodes().add(voClinic, clinicName); // WDEV-11914
    clinNode.setExpandedImage(form.getImages().Admin.Activity);
    clinNode.setCollapsedImage(form.getImages().Admin.Activity);
    if (voClinic.getIsActiveIsNotNull() && !voClinic.getIsActive())
    {
        clinNode.setTextColor(Color.Red);
    }

}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public ClinicVo getClinicByTaxonomyCode(TaxonomyType type,String taxCode)
{
    DomainFactory factory = getDomainFactory();
    String hql="select clinic from Clinic as clinic left join clinic.codeMappings as codeMappings " +
            "where (codeMappings.taxonomyCode = :code and codeMappings.taxonomyName =:name )";
    List clinics=factory.find(hql, new String []{"code", "name"},new Object []{taxCode, getDomLookup(type)});
    if (clinics.size()!=0)
    {
        Clinic clinic=(Clinic)clinics.get(0);
        return ClinicVoAssembler.create(clinic);
    }
    else
    {
        return null;
    }
}
项目:openMAXIMS    文件:ClinicAdminImpl.java   
public ClinicVo saveClinic(ClinicVo voClinic) throws StaleObjectException, UniqueKeyViolationException
{
    if(voClinic == null)
        throw new CodingRuntimeException("This Clinic Value Object is null");
    if(!voClinic.isValidated())
        throw new DomainRuntimeException("This Clinic Value Object has not been validated");

    DomainFactory factory = getDomainFactory();     
    Clinic domClinic = ClinicVoAssembler.extractClinic(factory,voClinic);
    domClinic.setUpperNames();

    try
    {
        factory.save(domClinic);
    }
    catch (UnqViolationUncheckedException e)
    {   
        throw new UniqueKeyViolationException("This Clinic Code already exists. ", e);
    }
    return ClinicVoAssembler.create(domClinic);
}
项目:openMAXIMS    文件:ClinicAdminImpl.java   
public ClinicVo getClinicByPASCode(String clinicCode)
{
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin join clin.codeMappings map where map.taxonomyCode = :clinicCode and map.taxonomyName = :type");
    names.add("clinicCode");
    values.add(clinicCode);
    names.add("type");
    values.add(getDomLookup(TaxonomyType.PAS));
    List clinics = factory.find(hql.toString(), names, values, 1000);
    if (clinics != null && clinics.size() > 0)
        return ClinicVoAssembler.create((Clinic) clinics.get(0));

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void overlayClinicAccess(ClinicAccessVoCollection voCollClinicAccess)
{
    for (int i = 0; voCollClinicAccess != null && i < voCollClinicAccess.size();i++) 
    {
        for (int j = 0; j < form.grdClinic().getRows().size(); j++) 
        {
            if (form.grdClinic().getRows().get(j).getValue() instanceof ClinicVo)
            {
                ClinicVo voClinic = (ClinicVo) form.grdClinic().getRows().get(j).getValue();
                if (voCollClinicAccess.get(i).getClinic().getID_Clinic().intValue()  == voClinic.getID_Clinic().intValue())
                {                   
                    form.grdClinic().getRows().get(j).setValue(voCollClinicAccess.get(i));                                              
                    form.grdClinic().getRows().get(j).setcolAccess(voCollClinicAccess.get(i).getAccessRight());
                    break;                                              
                }
            }
        }
    }
}
项目:openMAXIMS    文件:M05VoMapper.java   
private void saveClinic(ClinicVo clinic) throws HL7Exception
{
    try
    {
        String[] errors = clinic.validate();
        if (errors != null)
        {
            throw new HL7Exception("Validation of Clinic failed. " + VoMapper.toDisplayString(errors));             
        }
        orgLoc.saveClinic(clinic);
    }
    catch (StaleObjectException e)
    {
        LOG.error("StaleObjectException occurred saving clinic - " + e.getMessage(), e);
        throw new HL7Exception("Clinic data has been updated by another user/process - please try again", e);
    }

}
项目:openMAXIMS    文件:Logic.java   
/**
 * Default in the search critera based on the details passed in the parameter
 * If the parameter is not null retrieve any matching records and populate the tree 
 * @param ClinicVo
 */  
private void populateSearchCriteriaAndSearch(ClinicVo voClinic)
{
    if (voClinic != null && voClinic.getID_ClinicIsNotNull())
    {
        form.cmbSearchLoc().setValue(voClinic.getClinicLocation());

        //WDEV-11914
        loadSearchOutpatientDepartment(form.cmbSearchLoc().getValue());

        form.txtSearchName().setValue(voClinic.getClinicName());
        form.chkSearchAciveOnly().setValue(voClinic.getIsActive());

        if (voClinic.getID_ClinicIsNotNull() && (voClinic.getClinicNameIsNotNull() || voClinic.getMapping(TaxonomyType.PAS) != null || voClinic.getClinicLocationIsNotNull()))
        {
            search();
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
/**
 * Populate the instance details fields based on the fields contained in the paramater ClinicVo
 * @param ClinicVo
 */
private void populateInstanceControl(ClinicVo voClinic)
{
    if(voClinic == null)
        clearInstanceDetails();
    else
    {
        form.cmbClinicLoc().setValue(voClinic.getClinicLocation());

        //WDEV-11914 - starts here
        loadOutpatientDepartment(form.cmbClinicLoc().getValue());
        form.cmbOutpatient().setValue(voClinic.getOutpatientDept());
        //WDEV-11914 - ends here

        form.txtName().setValue(voClinic.getClinicName());  
        form.chkActive().setValue(voClinic.getIsActive());
    }       
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Event fired when a selection is made on the tree
 * @param TreeNode node
 * @throws PresentationLogicException
 */
protected void onTreClinicsTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException
{
    form.TaxonomyMappings().setComponentMode(FormMode.VIEW);
    clearInstanceDetails();
    form.getLocalContext().setSelectedRecord(null);

    if (node.getValue() != null && node.getValue() instanceof ClinicLiteVo)
    {
        ClinicVo clin = domain.getClinic((ClinicLiteVo)node.getValue());
        form.getLocalContext().setSelectedRecord(clin);
        populateInstanceControl(clin);
        form.TaxonomyMappings().setValue(clin.getCodeMappings());
    }
    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Creates a clinic node in the tree for the value passed in
 * If the clinic is inactive set the colour of the text to red
 * @see createClinicNode(TreeNode nodeLoc, ClinicVo voClinic)
 * @param TreeNode nodeLoc
 * @param ClinicVo voClinic
 */
private void createClinicNode(ClinicVo voClinic)
{
    TreeNode nodeLoc = form.treClinics().getNodeByValue(voClinic.getClinicLocation());

    // Add clinic to location (as child node)

    // WDEV-11914 - starts here
    if (nodeLoc == null || voClinic == null)
        return;

    String clinicName = voClinic.getClinicName();

    if (voClinic.getOutpatientDeptIsNotNull())
        clinicName += " - " + voClinic.getOutpatientDept().getName();
    // WDEV-11914 - ends here

    TreeNode clinNode = nodeLoc.getNodes().add(voClinic, clinicName); // WDEV-11914
    clinNode.setExpandedImage(form.getImages().Admin.Activity);
    clinNode.setCollapsedImage(form.getImages().Admin.Activity);
    if (voClinic.getIsActiveIsNotNull() && !voClinic.getIsActive())
    {
        clinNode.setTextColor(Color.Red);
    }

}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public ClinicVo getClinicByTaxonomyCode(TaxonomyType type,String taxCode)
{
    DomainFactory factory = getDomainFactory();
    String hql="select clinic from Clinic as clinic left join clinic.codeMappings as codeMappings " +
            "where (codeMappings.taxonomyCode = :code and codeMappings.taxonomyName =:name )";
    List clinics=factory.find(hql, new String []{"code", "name"},new Object []{taxCode, getDomLookup(type)});
    if (clinics.size()!=0)
    {
        Clinic clinic=(Clinic)clinics.get(0);
        return ClinicVoAssembler.create(clinic);
    }
    else
    {
        return null;
    }
}
项目:openMAXIMS    文件:ClinicAdminImpl.java   
public ClinicVo saveClinic(ClinicVo voClinic) throws StaleObjectException, UniqueKeyViolationException
{
    if(voClinic == null)
        throw new CodingRuntimeException("This Clinic Value Object is null");
    if(!voClinic.isValidated())
        throw new DomainRuntimeException("This Clinic Value Object has not been validated");

    DomainFactory factory = getDomainFactory();     
    Clinic domClinic = ClinicVoAssembler.extractClinic(factory,voClinic);
    domClinic.setUpperNames();

    try
    {
        factory.save(domClinic);
    }
    catch (UnqViolationUncheckedException e)
    {   
        throw new UniqueKeyViolationException("This Clinic Code already exists. ", e);
    }
    return ClinicVoAssembler.create(domClinic);
}
项目:openMAXIMS    文件:ClinicAdminImpl.java   
public ClinicVo getClinicByPASCode(String clinicCode)
{
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin join clin.codeMappings map where map.taxonomyCode = :clinicCode and map.taxonomyName = :type");
    names.add("clinicCode");
    values.add(clinicCode);
    names.add("type");
    values.add(getDomLookup(TaxonomyType.PAS));
    List clinics = factory.find(hql.toString(), names, values, 1000);
    if (clinics != null && clinics.size() > 0)
        return ClinicVoAssembler.create((Clinic) clinics.get(0));

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void overlayClinicAccess(ClinicAccessVoCollection voCollClinicAccess)
{
    for (int i = 0; voCollClinicAccess != null && i < voCollClinicAccess.size();i++) 
    {
        for (int j = 0; j < form.grdClinic().getRows().size(); j++) 
        {
            if (form.grdClinic().getRows().get(j).getValue() instanceof ClinicVo)
            {
                ClinicVo voClinic = (ClinicVo) form.grdClinic().getRows().get(j).getValue();
                if (voCollClinicAccess.get(i).getClinic().getID_Clinic().intValue()  == voClinic.getID_Clinic().intValue())
                {                   
                    form.grdClinic().getRows().get(j).setValue(voCollClinicAccess.get(i));                                              
                    form.grdClinic().getRows().get(j).setcolAccess(voCollClinicAccess.get(i).getAccessRight());
                    break;                                              
                }
            }
        }
    }
}
项目:openmaxims-linux    文件:M05VoMapper.java   
private void saveClinic(ClinicVo clinic) throws HL7Exception
{
    try
    {
        String[] errors = clinic.validate();
        if (errors != null)
        {
            throw new HL7Exception("Validation of Clinic failed. " + VoMapper.toDisplayString(errors));             
        }
        orgLoc.saveClinic(clinic);
    }
    catch (StaleObjectException e)
    {
        LOG.error("StaleObjectException occurred saving clinic - " + e.getMessage(), e);
        throw new HL7Exception("Clinic data has been updated by another user/process - please try again", e);
    }

}
项目:openmaxims-linux    文件:Logic.java   
/**
 * Default in the search critera based on the details passed in the parameter
 * If the parameter is not null retrieve any matching records and populate the tree 
 * @param ClinicVo
 */  
private void populateSearchCriteriaAndSearch(ClinicVo voClinic)
{
    if (voClinic != null && voClinic.getID_ClinicIsNotNull())
    {
        form.cmbSearchLoc().setValue(voClinic.getClinicLocation());

        //WDEV-11914
        loadSearchOutpatientDepartment(form.cmbSearchLoc().getValue());

        form.txtSearchName().setValue(voClinic.getClinicName());
        form.chkSearchAciveOnly().setValue(voClinic.getIsActive());

        if (voClinic.getID_ClinicIsNotNull() && (voClinic.getClinicNameIsNotNull() || voClinic.getMapping(TaxonomyType.PAS) != null || voClinic.getClinicLocationIsNotNull()))
        {
            search();
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
/**
 * Populate the instance details fields based on the fields contained in the paramater ClinicVo
 * @param ClinicVo
 */
private void populateInstanceControl(ClinicVo voClinic)
{
    if(voClinic == null)
        clearInstanceDetails();
    else
    {
        form.cmbClinicLoc().setValue(voClinic.getClinicLocation());

        //WDEV-11914 - starts here
        loadOutpatientDepartment(form.cmbClinicLoc().getValue());
        form.cmbOutpatient().setValue(voClinic.getOutpatientDept());
        //WDEV-11914 - ends here

        form.txtName().setValue(voClinic.getClinicName());  
        form.chkActive().setValue(voClinic.getIsActive());
    }       
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * Event fired when a selection is made on the tree
 * @param TreeNode node
 * @throws PresentationLogicException
 */
protected void onTreClinicsTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException
{
    form.TaxonomyMappings().setComponentMode(FormMode.VIEW);
    clearInstanceDetails();
    form.getLocalContext().setSelectedRecord(null);

    if (node.getValue() != null && node.getValue() instanceof ClinicLiteVo)
    {
        ClinicVo clin = domain.getClinic((ClinicLiteVo)node.getValue());
        form.getLocalContext().setSelectedRecord(clin);
        populateInstanceControl(clin);
        form.TaxonomyMappings().setValue(clin.getCodeMappings());
    }
    updateControlsState();
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * Creates a clinic node in the tree for the value passed in
 * If the clinic is inactive set the colour of the text to red
 * @see createClinicNode(TreeNode nodeLoc, ClinicVo voClinic)
 * @param TreeNode nodeLoc
 * @param ClinicVo voClinic
 */
private void createClinicNode(ClinicVo voClinic)
{
    TreeNode nodeLoc = form.treClinics().getNodeByValue(voClinic.getClinicLocation());

    // Add clinic to location (as child node)

    // WDEV-11914 - starts here
    if (nodeLoc == null || voClinic == null)
        return;

    String clinicName = voClinic.getClinicName();

    if (voClinic.getOutpatientDeptIsNotNull())
        clinicName += " - " + voClinic.getOutpatientDept().getName();
    // WDEV-11914 - ends here

    TreeNode clinNode = nodeLoc.getNodes().add(voClinic, clinicName); // WDEV-11914
    clinNode.setExpandedImage(form.getImages().Admin.Activity);
    clinNode.setCollapsedImage(form.getImages().Admin.Activity);
    if (voClinic.getIsActiveIsNotNull() && !voClinic.getIsActive())
    {
        clinNode.setTextColor(Color.Red);
    }

}
项目:openmaxims-linux    文件:OrganisationAndLocationImpl.java   
public ClinicVo getClinicByTaxonomyCode(TaxonomyType type,String taxCode)
{
    DomainFactory factory = getDomainFactory();
    String hql="select clinic from Clinic as clinic left join clinic.codeMappings as codeMappings " +
            "where (codeMappings.taxonomyCode = :code and codeMappings.taxonomyName =:name )";
    List clinics=factory.find(hql, new String []{"code", "name"},new Object []{taxCode, getDomLookup(type)});
    if (clinics.size()!=0)
    {
        Clinic clinic=(Clinic)clinics.get(0);
        return ClinicVoAssembler.create(clinic);
    }
    else
    {
        return null;
    }
}
项目:openmaxims-linux    文件:ClinicAdminImpl.java   
public ClinicVo saveClinic(ClinicVo voClinic) throws StaleObjectException, UniqueKeyViolationException
{
    if(voClinic == null)
        throw new CodingRuntimeException("This Clinic Value Object is null");
    if(!voClinic.isValidated())
        throw new DomainRuntimeException("This Clinic Value Object has not been validated");

    DomainFactory factory = getDomainFactory();     
    Clinic domClinic = ClinicVoAssembler.extractClinic(factory,voClinic);
    domClinic.setUpperNames();

    try
    {
        factory.save(domClinic);
    }
    catch (UnqViolationUncheckedException e)
    {   
        throw new UniqueKeyViolationException("This Clinic Code already exists. ", e);
    }
    return ClinicVoAssembler.create(domClinic);
}
项目:openmaxims-linux    文件:ClinicAdminImpl.java   
public ClinicVo getClinicByPASCode(String clinicCode)
{
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String prepend = " where ";
    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("from Clinic clin join clin.codeMappings map where map.taxonomyCode = :clinicCode and map.taxonomyName = :type");
    names.add("clinicCode");
    values.add(clinicCode);
    names.add("type");
    values.add(getDomLookup(TaxonomyType.PAS));
    List clinics = factory.find(hql.toString(), names, values, 1000);
    if (clinics != null && clinics.size() > 0)
        return ClinicVoAssembler.create((Clinic) clinics.get(0));

    return null;
}
项目:AvoinApotti    文件:PatientJourneyImpl.java   
public String getClinicName(String clinicCode)
{
    if (clinicCode == null)
        return null;

    ClinicAdmin newImpl = (ClinicAdmin) getDomainImpl(ClinicAdminImpl.class);
    ClinicVo clinic = newImpl.getClinicByPASCode(clinicCode);
    if (clinic != null)
        return clinic.getClinicName();
    return null;
}
项目:openMAXIMS    文件:PatientJourneyImpl.java   
public String getClinicName(String clinicCode)
{
    if (clinicCode == null)
        return null;

    ClinicAdmin newImpl = (ClinicAdmin) getDomainImpl(ClinicAdminImpl.class);
    ClinicVo clinic = newImpl.getClinicByPASCode(clinicCode);
    if (clinic != null)
        return clinic.getClinicName();
    return null;
}
项目:openMAXIMS    文件:PatientJourneyImpl.java   
public String getClinicName(String clinicCode)
{
    if (clinicCode == null)
        return null;

    ClinicAdmin newImpl = (ClinicAdmin) getDomainImpl(ClinicAdminImpl.class);
    ClinicVo clinic = newImpl.getClinicByPASCode(clinicCode);
    if (clinic != null)
        return clinic.getClinicName();
    return null;
}
项目:openmaxims-linux    文件:PatientJourneyImpl.java   
public String getClinicName(String clinicCode)
{
    if (clinicCode == null)
        return null;

    ClinicAdmin newImpl = (ClinicAdmin) getDomainImpl(ClinicAdminImpl.class);
    ClinicVo clinic = newImpl.getClinicByPASCode(clinicCode);
    if (clinic != null)
        return clinic.getClinicName();
    return null;
}