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

项目:AvoinApotti    文件:Logic.java   
private void listOrderingHospitals()
{
    LocSiteLiteMappingsVoCollection orderingHospitals = domain.listLocSites();
    PatientShort ps = form.getGlobalContext().Core.getPatientShort();
    if (ps==null)
        return;
    PatientIdCollection ids= ps.getIdentifiers();
    if (ids==null)
        return;
    for (LocSiteLiteMappingsVo locationLiteMappingsVo : orderingHospitals)
    {
        for (PatientId patientId : ids)
        {
            if (patientId.getType().equals(PatIdType.PASID)&&patientId.getValue().startsWith(locationLiteMappingsVo.getPathMapping()))
            {
                form.cmbOrderingHosp().newRow(locationLiteMappingsVo.getProviderHospital(), locationLiteMappingsVo.getProviderHospital().getName());
                continue;
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private DynamicGridRow getIdentifierRow(DynamicGridRow row, DynamicGridColumn column, PatientId identifier) 
{
    if(row == null)
        return null;

    for(int i=0; i<row.getRows().size(); i++)
    {
        if(row.getRows().get(i).getValue().equals(identifier.getType()) && (row.getRows().get(i).getCells().get(column) == null || (row.getRows().get(i).getCells().get(column) != null && row.getRows().get(i).getCells().get(column).getValue() == null)))
        {
            return row.getRows().get(i);
        }
    }

    DynamicGridRow childRow = row.getRows().newRow();

    DynamicGridCell cell = childRow.getCells().newCell(getColumn(COL_FIELD_NAME), DynamicCellType.STRING);
    cell.setValue("<b>" + identifier.getType().getText() + "</b>");
    cell.setReadOnly(true);

    childRow.setValue(identifier.getType());
    return childRow;
}
项目:AvoinApotti    文件:Logic.java   
private boolean checkForDUPIdentifiers() 
{
    if(form.getLocalContext().getResultPatient() == null || form.getLocalContext().getResultPatient().getIdentifiers() == null)
        return false;

    for(int j=0; j<form.getLocalContext().getResultPatient().getIdentifiers().size(); j++)
    {
        PatientId iden = form.getLocalContext().getResultPatient().getIdentifiers().get(j);

        if(iden == null)
            continue;

        if(!iden.getType().equals(PatIdType.NHSN))
            continue;

        if(iden.getIdValue() != null && !iden.getIdValue().equals(formatIdentifierValue(iden.getIdValue())))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
public int compare(PatientId o1, PatientId o2)
{
    if (o1 != null && o1.getType() != null && o2!=null && o2.getType() != null)
    {
        int typeCompare = o1.getType().compareTo(o2.getType());

        if(typeCompare == 0 && o1.getIdValue() != null && o2.getIdValue() != null)
        {
            return o1.getIdValue().compareToIgnoreCase(o2.getIdValue());
        }

        return typeCompare;
    }

    if (o1 == null || o1.getType() == null)
        return -1*order;

    if (o2 == null || o2.getType() == null)
        return order;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
private PatientFilter getPatientFilterDetails()
{
    PatientFilter voPatFilter = new PatientFilter();

    if (form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue() != null && form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue().length() > 0)
    {
        PatientId pid = new PatientId();
        pid.setType(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
        pid.setValue(form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue());
        voPatFilter.setPersId(pid);
    }
    else
    {
        voPatFilter.setForename(form.lyrCustomListSearch().tabCustomListDetails().txtName().getValue());
        voPatFilter.setSurname(form.lyrCustomListSearch().tabCustomListDetails().txtSurname().getValue());
        voPatFilter.setDob(form.lyrCustomListSearch().tabCustomListDetails().pdtDate().getValue());
    }

    return voPatFilter;
}
项目:AvoinApotti    文件:PatientMergeManagerImpl.java   
private Integer getPatientIdFromPatient(DomainFactory factory, PatientId pat)
{
    if (pat == null)
        return null;

    String hql = " from Patient p join p.identifiers as ids" +
            " where ids.type = :type and ids.value = :value";

    ArrayList<String> paramLabels = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    paramLabels.add("type");
    paramLabels.add("value");
    paramValues.add(getDomLookup(pat.getType()));
    paramValues.add(pat.getValue());
    List<?> lst = factory.find(hql, paramLabels, paramValues);
    if (lst == null || lst.size() == 0)
        return null;
    ims.core.patient.domain.objects.Patient domPat = (ims.core.patient.domain.objects.Patient) lst.get(0);
    return domPat.getId();
}
项目:AvoinApotti    文件:PatientMergeManagerImpl.java   
private Integer getPatientIdFromMerge(DomainFactory factory, PatientId pat)
{
    if (pat == null)
        return null;

    String hql = " from PatientMergeHistory p join p.patientIds as ids" +
            " where ids.type = :type and ids.value = :value";

    ArrayList<String> paramLabels = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    paramLabels.add("type");
    paramLabels.add("value");
    paramValues.add(getDomLookup(pat.getType()));
    paramValues.add(pat.getValue());
    List<?> lst = factory.find(hql, paramLabels, paramValues);
    if (lst == null || lst.size() == 0)
        return null;
    PatientMergeHistory domPat = (PatientMergeHistory) lst.get(0);
    return domPat.getSourcePatId();
}
项目:AvoinApotti    文件:Logic.java   
private  String getMRN(PatientForTriageVo patient)
{
    if (patient==null || patient.getIdentifiers()==null || patient.getIdentifiers().size()==0)
        return null;

    for (int i=0;i<patient.getIdentifiers().size();i++)
    {
        PatientId tempId = patient.getIdentifiers().get(i);
        if (PatIdType.HOSPNUM.equals(tempId.getType()))
        {
            return tempId.getValue();

        }
    }

    return null;
}
项目:AvoinApotti    文件:A40VoMapper.java   
private boolean comparePatIds(PatientId first,PatientId second)
{
    if(first==null||second==null)
        return false;
    if(first.equals(second))
        return true;
    if(first.getTypeIsNotNull()&&second.getTypeIsNotNull()&&first.getType().equals(second.getType())
            &&first.getValueIsNotNull()&&second.getValueIsNotNull()&&first.getValue().equals(second.getValue())
            )
    {
        boolean firstVerified=first.getVerifiedIsNotNull()&&first.getVerified()?true:false;
        boolean secondVerified=second.getVerifiedIsNotNull()&&first.getVerified()?true:false;
        if(firstVerified==secondVerified)
            return true;
    }
    //fall through
     return false;
}
项目:AvoinApotti    文件:A47VoMapper.java   
private PatientId getPatientIdFromColl(PatientIdCollection coll, PatIdType idType)
{
    if (coll == null) 
        return null;

    for (int i = 0; i < coll.size(); i++)
    {
        ims.core.vo.PatientId id = coll.get(i);
        if (id.getType().equals(idType))
        {
            return id;
        }
    }
    return null;

}
项目:AvoinApotti    文件:Logic.java   
private PatientFilter getPatientFilterDetails()
{
    PatientFilter voPatFilter = new PatientFilter();

    if (form.txtDisplayId().getValue() != null && form.txtDisplayId().getValue().length() > 0)
    {
        PatientId pid = new PatientId();
        pid.setType(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
        pid.setValue(form.txtDisplayId().getValue());
        voPatFilter.setPersId(pid);
    }
    else
    {
        voPatFilter.setForename(form.txtName().getValue());
        voPatFilter.setSurname(form.txtSurname().getValue());
        voPatFilter.setDob(form.pdtDate().getValue());
    }

    return voPatFilter;
}
项目:AvoinApotti    文件:Logic.java   
private boolean validateSearchCriteria()
{

    if (form.lyrHL7().tabQuery().cmbPatIdType().getValue() != null && form.lyrHL7().tabQuery().txtPatId().getValue() != null && !form.lyrHL7().tabQuery().txtPatId().getValue().trim().equals(""))
    {
        PatientId patId = new PatientId();
        patId.setType(form.lyrHL7().tabQuery().cmbPatIdType().getValue());
        patId.setValue(form.lyrHL7().tabQuery().txtPatId().getValue());
        form.getLocalContext().setPatId(patId);
    }
    else
    {
        form.getLocalContext().setPatId(null);
    }
    //WDEV-17055 
    String[] dateRangeErrors = validatUIRules(getDateTimeFrom(), getDateTimeTo());


    if (dateRangeErrors != null && dateRangeErrors.length > 0)
    {
        engine.showErrors(dateRangeErrors);
        return false;
    }
    //end //WDEV-17055
    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void OutBoundSearch()
{
    if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue() != null && form.lyrHL7().tabDemographicFeed().dtimEnd().getValue() != null) //wdev-14649
    {
        if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue().isGreaterThan(form.lyrHL7().tabDemographicFeed().dtimEnd().getValue()))
        {
            engine.showErrors(new String[]{"Start Date cannot be greater than End Date"});
            return;
        }
    }

    DateTime start = form.lyrHL7().tabDemographicFeed().dtimStart().getValue();
    DateTime end = form.lyrHL7().tabDemographicFeed().dtimEnd().getValue();
    PatientId patId = new PatientId();
    patId.setType(form.lyrHL7().tabDemographicFeed().cmbPatId().getValue());
    patId.setValue(form.lyrHL7().tabDemographicFeed().txtOBPatId().getValue());
    MsgEventType msgType =  form.lyrHL7().tabDemographicFeed().cmbMsgType().getValue();
    ProviderSystemRefVo providerSystem = form.lyrHL7().tabDemographicFeed().cmbProviderSystem().getValue();
    populate(domain.getOBFeedEntries(start, end, patId, msgType, providerSystem));
}
项目:AvoinApotti    文件:Logic.java   
private PatientFilter getPatientFilterDetails()
{
    PatientFilter voPatFilter = new PatientFilter();

    if (form.txtDisplayId().getValue() != null && form.txtDisplayId().getValue().length() > 0)
    {
        PatientId pid = new PatientId();
        pid.setType(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
        pid.setValue(form.txtDisplayId().getValue());
        voPatFilter.setPersId(pid);
    }
    else
    {
        voPatFilter.setForename(form.txtName().getValue());
        voPatFilter.setSurname(form.txtSurname().getValue());
        voPatFilter.setDob(form.pdtDate().getValue());
    }

    return voPatFilter;
}
项目:openMAXIMS    文件:Logic.java   
private  String getMRN(PatientForTriageVo patient)
{
    if (patient==null || patient.getIdentifiers()==null || patient.getIdentifiers().size()==0)
        return null;

    for (int i=0;i<patient.getIdentifiers().size();i++)
    {
        PatientId tempId = patient.getIdentifiers().get(i);
        if (PatIdType.HOSPNUM.equals(tempId.getType()))
        {
            return tempId.getValue();

        }
    }

    return null;
}
项目:openMAXIMS    文件:A40VoMapper.java   
private boolean comparePatIds(PatientId first,PatientId second)
{
    if(first==null||second==null)
        return false;
    if(first.equals(second))
        return true;
    if(first.getTypeIsNotNull()&&second.getTypeIsNotNull()&&first.getType().equals(second.getType())
            &&first.getValueIsNotNull()&&second.getValueIsNotNull()&&first.getValue().equals(second.getValue())
            )
    {
        boolean firstVerified=first.getVerifiedIsNotNull()&&first.getVerified()?true:false;
        boolean secondVerified=second.getVerifiedIsNotNull()&&first.getVerified()?true:false;
        if(firstVerified==secondVerified)
            return true;
    }
    //fall through
     return false;
}
项目:openmaxims-linux    文件:A40VoMapper.java   
private boolean comparePatIds(PatientId first,PatientId second)
{
    if(first==null||second==null)
        return false;
    if(first.equals(second))
        return true;
    if(first.getTypeIsNotNull()&&second.getTypeIsNotNull()&&first.getType().equals(second.getType())
            &&first.getValueIsNotNull()&&second.getValueIsNotNull()&&first.getValue().equals(second.getValue())
            )
    {
        boolean firstVerified=first.getVerifiedIsNotNull()&&first.getVerified()?true:false;
        boolean secondVerified=second.getVerifiedIsNotNull()&&first.getVerified()?true:false;
        if(firstVerified==secondVerified)
            return true;
    }
    //fall through
     return false;
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(PatientId o1, PatientId o2)
{
    if (o1 != null && o1.getType() != null && o2!=null && o2.getType() != null)
    {
        int typeCompare = o1.getType().compareTo(o2.getType());

        if(typeCompare == 0 && o1.getIdValue() != null && o2.getIdValue() != null)
        {
            return o1.getIdValue().compareToIgnoreCase(o2.getIdValue());
        }

        return typeCompare;
    }

    if (o1 == null || o1.getType() == null)
        return -1*order;

    if (o2 == null || o2.getType() == null)
        return order;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isNHSVerified(PatientShort pat)
{
    PatientIdCollection identifers = pat.getIdentifiers();

    if (identifers != null)
    {
        for (int i = 0; i < identifers.size(); i++)
        {
            ims.core.vo.PatientId id = identifers.get(i);
            if(typeIsActive(id.getType()))
            {
                if ((!id.getVerifiedIsNotNull() || (id.getVerifiedIsNotNull() && !id.getVerified())) && id.getType().equals(PatIdType.NHSN))
                {
                    return false;
                }
            }
        }
    }
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow getIdentifierRow(DynamicGridRow row, DynamicGridColumn column, PatientId identifier) 
{
    if(row == null)
        return null;

    for(int i=0; i<row.getRows().size(); i++)
    {
        if(row.getRows().get(i).getValue().equals(identifier.getType()) && (row.getRows().get(i).getCells().get(column) == null || (row.getRows().get(i).getCells().get(column) != null && row.getRows().get(i).getCells().get(column).getValue() == null)))
        {
            return row.getRows().get(i);
        }
    }

    DynamicGridRow childRow = row.getRows().newRow();

    DynamicGridCell cell = childRow.getCells().newCell(getColumn(COL_FIELD_NAME), DynamicCellType.STRING);
    cell.setValue("<b>" + identifier.getType().getText() + "</b>");
    cell.setReadOnly(true);

    childRow.setValue(identifier.getType());
    return childRow;
}
项目:openMAXIMS    文件:Logic.java   
private boolean checkForDUPIdentifiers() 
{
    if(form.getLocalContext().getResultPatient() == null || form.getLocalContext().getResultPatient().getIdentifiers() == null)
        return false;

    for(int j=0; j<form.getLocalContext().getResultPatient().getIdentifiers().size(); j++)
    {
        PatientId iden = form.getLocalContext().getResultPatient().getIdentifiers().get(j);

        if(iden == null)
            continue;

        if(!iden.getType().equals(PatIdType.NHSN))
            continue;

        if(iden.getIdValue() != null && iden.getDuplicateNHSNum() != null && iden.getDuplicateNHSNum() > 0)//!iden.getIdValue().equals(formatIdentifierValue(iden.getIdValue())))
            return true;
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private PatientFilter getPatientFilterDetails()
{
    PatientFilter voPatFilter = new PatientFilter();

    if (form.txtDisplayId().getValue() != null && form.txtDisplayId().getValue().length() > 0)
    {
        PatientId pid = new PatientId();
        pid.setType(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
        pid.setValue(form.txtDisplayId().getValue());
        voPatFilter.setPersId(pid);
    }
    else
    {
        voPatFilter.setForename(form.txtName().getValue());
        voPatFilter.setSurname(form.txtSurname().getValue());
        voPatFilter.setDob(form.pdtDate().getValue());
    }

    return voPatFilter;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(PatientId o1, PatientId o2)
{
    if (o1 != null && o1.getType() != null && o2!=null && o2.getType() != null)
    {
        int typeCompare = o1.getType().compareTo(o2.getType());

        if(typeCompare == 0 && o1.getIdValue() != null && o2.getIdValue() != null)
        {
            return o1.getIdValue().compareToIgnoreCase(o2.getIdValue());
        }

        return typeCompare;
    }

    if (o1 == null || o1.getType() == null)
        return -1*order;

    if (o2 == null || o2.getType() == null)
        return order;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
private PatientFilter getPatientFilterDetails()
{
    PatientFilter voPatFilter = new PatientFilter();

    if (form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue() != null && form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue().length() > 0)
    {
        PatientId pid = new PatientId();
        pid.setType(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
        pid.setValue(form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue());
        voPatFilter.setPersId(pid);
    }
    else
    {
        voPatFilter.setForename(form.lyrCustomListSearch().tabCustomListDetails().txtName().getValue());
        voPatFilter.setSurname(form.lyrCustomListSearch().tabCustomListDetails().txtSurname().getValue());
        voPatFilter.setDob(form.lyrCustomListSearch().tabCustomListDetails().pdtDate().getValue());
    }

    return voPatFilter;
}
项目:openmaxims-linux    文件:Logic.java   
private void OutBoundSearch()
{
    if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue() != null && form.lyrHL7().tabDemographicFeed().dtimEnd().getValue() != null) //wdev-14649
    {
        if( form.lyrHL7().tabDemographicFeed().dtimStart().getValue().isGreaterThan(form.lyrHL7().tabDemographicFeed().dtimEnd().getValue()))
        {
            engine.showErrors(new String[]{"Start Date cannot be greater than End Date"});
            return;
        }
    }

    DateTime start = form.lyrHL7().tabDemographicFeed().dtimStart().getValue();
    DateTime end = form.lyrHL7().tabDemographicFeed().dtimEnd().getValue();
    PatientId patId = new PatientId();
    patId.setType(form.lyrHL7().tabDemographicFeed().cmbPatId().getValue());
    patId.setValue(form.lyrHL7().tabDemographicFeed().txtOBPatId().getValue());
    MsgEventType msgType =  form.lyrHL7().tabDemographicFeed().cmbMsgType().getValue();
    ProviderSystemRefVo providerSystem = form.lyrHL7().tabDemographicFeed().cmbProviderSystem().getValue();
    populate(domain.getOBFeedEntries(start, end, patId, msgType, providerSystem));
}
项目:openMAXIMS    文件:PDSDemographicsImpl.java   
@Override
public PatientLiteVoCollection listPatientsByIdentifier(PatientId patId)
{
    if(patId == null || patId.getValue() == null || patId.getType() == null)
        throw new CodingRuntimeException("Invalid arguments for listPatientsByIdentifier !");

    DomainFactory factory = getDomainFactory();

    String hql = "select p1_1 from Patient as p1_1 left join p1_1.identifiers as p2_1 left join p2_1.type as l1_1 where (l1_1.id = :type and p2_1.value = :value)";
    java.util.List patientList = factory.find(hql, new String[]{"type", "value"}, new Object[]{patId.getType().getId(), patId.getIdValue()});
    if (patientList != null && !patientList.isEmpty())
    {
        return PatientLiteVoAssembler.createPatientLiteVoCollectionFromPatient(patientList);
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private PatientFilter getPatientFilterDetails()
{
    PatientFilter voPatFilter = new PatientFilter();

    if (form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue() != null && form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue().length() > 0)
    {
        PatientId pid = new PatientId();
        pid.setType(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
        pid.setValue(form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue());
        voPatFilter.setPersId(pid);
    }
    else
    {
        voPatFilter.setForename(form.lyrCustomListSearch().tabCustomListDetails().txtName().getValue());
        voPatFilter.setSurname(form.lyrCustomListSearch().tabCustomListDetails().txtSurname().getValue());
        voPatFilter.setDob(form.lyrCustomListSearch().tabCustomListDetails().pdtDate().getValue());
    }

    return voPatFilter;
}
项目:openMAXIMS    文件:PatientMergeManagerImpl.java   
private Integer getPatientIdFromPatient(DomainFactory factory, PatientId pat)
{
    if (pat == null)
        return null;

    String hql = " from Patient p join p.identifiers as ids" +
            " where ids.type = :type and ids.value = :value";

    ArrayList<String> paramLabels = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    paramLabels.add("type");
    paramLabels.add("value");
    paramValues.add(getDomLookup(pat.getType()));
    paramValues.add(pat.getValue());
    List<?> lst = factory.find(hql, paramLabels, paramValues);
    if (lst == null || lst.size() == 0)
        return null;
    ims.core.patient.domain.objects.Patient domPat = (ims.core.patient.domain.objects.Patient) lst.get(0);
    return domPat.getId();
}
项目:openMAXIMS    文件:PatientMergeManagerImpl.java   
private Integer getPatientIdFromMerge(DomainFactory factory, PatientId pat)
{
    if (pat == null)
        return null;

    String hql = " from PatientMergeHistory p join p.patientIds as ids" +
            " where ids.type = :type and ids.value = :value";

    ArrayList<String> paramLabels = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    paramLabels.add("type");
    paramLabels.add("value");
    paramValues.add(getDomLookup(pat.getType()));
    paramValues.add(pat.getValue());
    List<?> lst = factory.find(hql, paramLabels, paramValues);
    if (lst == null || lst.size() == 0)
        return null;
    PatientMergeHistory domPat = (PatientMergeHistory) lst.get(0);
    return domPat.getSourcePatId();
}
项目:openmaxims-linux    文件:PatientMergeManagerImpl.java   
private Integer getPatientIdFromMerge(DomainFactory factory, PatientId pat)
{
    if (pat == null)
        return null;

    String hql = " from PatientMergeHistory p join p.patientIds as ids" +
            " where ids.type = :type and ids.value = :value";

    ArrayList<String> paramLabels = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    paramLabels.add("type");
    paramLabels.add("value");
    paramValues.add(getDomLookup(pat.getType()));
    paramValues.add(pat.getValue());
    List<?> lst = factory.find(hql, paramLabels, paramValues);
    if (lst == null || lst.size() == 0)
        return null;
    PatientMergeHistory domPat = (PatientMergeHistory) lst.get(0);
    return domPat.getSourcePatId();
}
项目:openmaxims-linux    文件:A47VoMapper.java   
private PatientId getPatientIdFromColl(PatientIdCollection coll, PatIdType idType)
{
    if (coll == null) 
        return null;

    for (int i = 0; i < coll.size(); i++)
    {
        ims.core.vo.PatientId id = coll.get(i);
        if (id.getType().equals(idType))
        {
            return id;
        }
    }
    return null;

}
项目:openmaxims-linux    文件:Logic.java   
private boolean validateSearchCriteria()
{

    if (form.lyrHL7().tabQuery().cmbPatIdType().getValue() != null && form.lyrHL7().tabQuery().txtPatId().getValue() != null && !form.lyrHL7().tabQuery().txtPatId().getValue().trim().equals(""))
    {
        PatientId patId = new PatientId();
        patId.setType(form.lyrHL7().tabQuery().cmbPatIdType().getValue());
        patId.setValue(form.lyrHL7().tabQuery().txtPatId().getValue());
        form.getLocalContext().setPatId(patId);
    }
    else
    {
        form.getLocalContext().setPatId(null);
    }
    //WDEV-17055 
    String[] dateRangeErrors = validatUIRules(getDateTimeFrom(), getDateTimeTo());


    if (dateRangeErrors != null && dateRangeErrors.length > 0)
    {
        engine.showErrors(dateRangeErrors);
        return false;
    }
    //end //WDEV-17055
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void displayHistory(Object[] args) 
{
    if (args != null && args.length == 1 && args[0] instanceof ISelectedPatient)
    {
        form.getGlobalContext().Core.setPatientShort(null);
        PatientShort ps = new ims.core.vo.PatientShort(((ISelectedPatient) args[0]).getISelectedPatientID(), 0);
        PatientId psId = new PatientId();
        PatientIdCollection psColl = new PatientIdCollection();
        ims.core.vo.lookups.PatIdType type = ims.core.vo.lookups.PatIdType.getNegativeInstance(((ISelectedPatient) args[0]).getISelectedPatientInterfaceIDType());
        if (type != null)
        {
            psId.setType(type);
            psId.setValue(((ISelectedPatient) args[0]).getISelectedPatientInterfaceID());
            if (psId.getValueIsNotNull())
            {
                psColl.add(psId);
                ps.setIdentifiers(psColl);
            }
        }
        form.getGlobalContext().Core.setPatientToBeDisplayed(ps);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void listOrderingHospitals()
{
    LocSiteLiteMappingsVoCollection orderingHospitals = domain.listLocSites();
    PatientShort ps = form.getGlobalContext().Core.getPatientShort();
    if (ps==null)
        return;
    PatientIdCollection ids= ps.getIdentifiers();
    if (ids==null)
        return;
    for (LocSiteLiteMappingsVo locationLiteMappingsVo : orderingHospitals)
    {
        for (PatientId patientId : ids)
        {
            if (patientId.getType().equals(PatIdType.PASID)&&patientId.getValue().startsWith(locationLiteMappingsVo.getPathMapping()))
            {
                form.cmbOrderingHosp().newRow(locationLiteMappingsVo.getProviderHospital(), locationLiteMappingsVo.getProviderHospital().getName());
                continue;
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean validateSearchCriteria()
{

    if (form.lyrHL7().tabQuery().cmbPatIdType().getValue() != null && form.lyrHL7().tabQuery().txtPatId().getValue() != null && !form.lyrHL7().tabQuery().txtPatId().getValue().trim().equals(""))
    {
        PatientId patId = new PatientId();
        patId.setType(form.lyrHL7().tabQuery().cmbPatIdType().getValue());
        patId.setValue(form.lyrHL7().tabQuery().txtPatId().getValue());
        form.getLocalContext().setPatId(patId);
    }
    else
    {
        form.getLocalContext().setPatId(null);
    }
    //WDEV-17055 
    String[] dateRangeErrors = validatUIRules(getDateTimeFrom(), getDateTimeTo());


    if (dateRangeErrors != null && dateRangeErrors.length > 0)
    {
        engine.showErrors(dateRangeErrors);
        return false;
    }
    //end //WDEV-17055
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private PatientFilter getPatientFilterDetails()
{
    PatientFilter voPatFilter = new PatientFilter();

    if (form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue() != null && form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue().length() > 0)
    {
        PatientId pid = new PatientId();
        pid.setType(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()));
        pid.setValue(form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue());
        voPatFilter.setPersId(pid);
    }
    else
    {
        voPatFilter.setForename(form.lyrCustomListSearch().tabCustomListDetails().txtName().getValue());
        voPatFilter.setSurname(form.lyrCustomListSearch().tabCustomListDetails().txtSurname().getValue());
        voPatFilter.setDob(form.lyrCustomListSearch().tabCustomListDetails().pdtDate().getValue());
    }

    return voPatFilter;
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow getIdentifierRow(DynamicGridRow row, DynamicGridColumn column, PatientId identifier) 
{
    if(row == null)
        return null;

    for(int i=0; i<row.getRows().size(); i++)
    {
        if(row.getRows().get(i).getValue().equals(identifier.getType()) && (row.getRows().get(i).getCells().get(column) == null || (row.getRows().get(i).getCells().get(column) != null && row.getRows().get(i).getCells().get(column).getValue() == null)))
        {
            return row.getRows().get(i);
        }
    }

    DynamicGridRow childRow = row.getRows().newRow();

    DynamicGridCell cell = childRow.getCells().newCell(getColumn(COL_FIELD_NAME), DynamicCellType.STRING);
    cell.setValue("<b>" + identifier.getType().getText() + "</b>");
    cell.setReadOnly(true);

    childRow.setValue(identifier.getType());
    return childRow;
}
项目:openMAXIMS    文件:Logic.java   
private boolean checkForDUPIdentifiers() 
{
    if(form.getLocalContext().getResultPatient() == null || form.getLocalContext().getResultPatient().getIdentifiers() == null)
        return false;

    for(int j=0; j<form.getLocalContext().getResultPatient().getIdentifiers().size(); j++)
    {
        PatientId iden = form.getLocalContext().getResultPatient().getIdentifiers().get(j);

        if(iden == null)
            continue;

        if(!iden.getType().equals(PatIdType.NHSN))
            continue;

        if(iden.getIdValue() != null && !iden.getIdValue().equals(formatIdentifierValue(iden.getIdValue())))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(PatientId o1, PatientId o2)
{
    if (o1 != null && o1.getType() != null && o2!=null && o2.getType() != null)
    {
        int typeCompare = o1.getType().compareTo(o2.getType());

        if(typeCompare == 0 && o1.getIdValue() != null && o2.getIdValue() != null)
        {
            return o1.getIdValue().compareToIgnoreCase(o2.getIdValue());
        }

        return typeCompare;
    }

    if (o1 == null || o1.getType() == null)
        return -1*order;

    if (o2 == null || o2.getType() == null)
        return order;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
private void populatePatientDetails(PatientShort voPatientShort)
{
    // Patient Id
    PatientId idPat = voPatientShort.getPatId(PatIdType.CHARTNUM);
    if (idPat != null)
        form.ctnPatientDetails().txtPatientId().setValue(idPat.getValue());

    // PPSN
    if (voPatientShort.getPpsn() != null)
        form.ctnPatientDetails().txtPPSN().setValue(voPatientShort.getPpsn().getValue());

    // Medical Record Number
    form.ctnPatientDetails().txtMedicalRecNo().setValue(voPatientShort.getHospnum().getValue());

    if (voPatientShort.getDobIsNotNull())
        form.ctnPatientDetails().txtDOB().setValue(voPatientShort.getDob().toString(DateFormat.STANDARD));

    if (voPatientShort.getNameIsNotNull())
    {
        if (voPatientShort.getName().getForenameIsNotNull())
            form.ctnPatientDetails().txtForename().setValue(voPatientShort.getName().getForename());
        if (voPatientShort.getName().getSurnameIsNotNull())
            form.ctnPatientDetails().txtSurname().setValue(voPatientShort.getName().getSurname());
        if (voPatientShort.getName().getTitleIsNotNull())
            form.ctnPatientDetails().txtTitle().setValue(voPatientShort.getName().getTitle().getText());
    }

    if (voPatientShort.getAddressIsNotNull())
    {
        form.ctnPatientDetails().txtAddress1().setValue(voPatientShort.getAddress().getLine1());
        form.ctnPatientDetails().txtAddress2().setValue(voPatientShort.getAddress().getLine2());
        form.ctnPatientDetails().txtAddress3().setValue(voPatientShort.getAddress().getLine3());
        form.ctnPatientDetails().txtAddress4().setValue(voPatientShort.getAddress().getLine4());
        form.ctnPatientDetails().txtAddress5().setValue(voPatientShort.getAddress().getLine5());
    }
}