private PatientAllergy getFromList(List<PatientAllergy> currentAllergies,IfPatientAllergyVo allergyFromMsg)
{
for (PatientAllergy patientAllergy : currentAllergies)
{
if(patientAllergy!=null
&&patientAllergy.getAllergen()!=null
&&patientAllergy.getAllergen().getId()!=null
&&patientAllergy.getSourceofInformation()!=null
&&allergyFromMsg!=null
&&allergyFromMsg.getAllergen()!=null
&&allergyFromMsg.getAllergen().getBoId()!=null
&&allergyFromMsg.getSourceofInformation()!=null
&&patientAllergy.getAllergen().getId().equals(allergyFromMsg.getAllergen().getBoId())
&&patientAllergy.getSourceofInformation().getId()==allergyFromMsg.getSourceofInformation().getID())
{
return patientAllergy;
}
}
return null;
}
java类ims.core.vo.IfPatientAllergyVo的实例源码
AllergiesImpl.java 文件源码
项目:AvoinApotti
阅读 23
收藏 0
点赞 0
评论 0
AllergiesImpl.java 文件源码
项目:openMAXIMS
阅读 21
收藏 0
点赞 0
评论 0
private PatientAllergy getFromList(List<PatientAllergy> currentAllergies,IfPatientAllergyVo allergyFromMsg)
{
for (PatientAllergy patientAllergy : currentAllergies)
{
if(patientAllergy!=null
&&patientAllergy.getAllergen()!=null
&&patientAllergy.getAllergen().getId()!=null
&&patientAllergy.getSourceofInformation()!=null
&&allergyFromMsg!=null
&&allergyFromMsg.getAllergen()!=null
&&allergyFromMsg.getAllergen().getBoId()!=null
&&allergyFromMsg.getSourceofInformation()!=null
&&patientAllergy.getAllergen().getId().equals(allergyFromMsg.getAllergen().getBoId())
&&patientAllergy.getSourceofInformation().getId()==allergyFromMsg.getSourceofInformation().getID())
{
return patientAllergy;
}
}
return null;
}
AllergiesImpl.java 文件源码
项目:openMAXIMS
阅读 28
收藏 0
点赞 0
评论 0
private PatientAllergy getFromList(List<PatientAllergy> currentAllergies,IfPatientAllergyVo allergyFromMsg)
{
for (PatientAllergy patientAllergy : currentAllergies)
{
if(patientAllergy!=null
&&patientAllergy.getAllergen()!=null
&&patientAllergy.getAllergen().getId()!=null
&&patientAllergy.getSourceofInformation()!=null
&&allergyFromMsg!=null
&&allergyFromMsg.getAllergen()!=null
&&allergyFromMsg.getAllergen().getBoId()!=null
&&allergyFromMsg.getSourceofInformation()!=null
&&patientAllergy.getAllergen().getId().equals(allergyFromMsg.getAllergen().getBoId())
&&patientAllergy.getSourceofInformation().getId()==allergyFromMsg.getSourceofInformation().getID())
{
return patientAllergy;
}
}
return null;
}
AllergiesImpl.java 文件源码
项目:openmaxims-linux
阅读 24
收藏 0
点赞 0
评论 0
private PatientAllergy getFromList(List<PatientAllergy> currentAllergies,IfPatientAllergyVo allergyFromMsg)
{
for (PatientAllergy patientAllergy : currentAllergies)
{
if(patientAllergy!=null
&&patientAllergy.getAllergen()!=null
&&patientAllergy.getAllergen().getId()!=null
&&patientAllergy.getSourceofInformation()!=null
&&allergyFromMsg!=null
&&allergyFromMsg.getAllergen()!=null
&&allergyFromMsg.getAllergen().getBoId()!=null
&&allergyFromMsg.getSourceofInformation()!=null
&&patientAllergy.getAllergen().getId().equals(allergyFromMsg.getAllergen().getBoId())
&&patientAllergy.getSourceofInformation().getId()==allergyFromMsg.getSourceofInformation().getID())
{
return patientAllergy;
}
}
return null;
}
AllergiesImpl.java 文件源码
项目:AvoinApotti
阅读 30
收藏 0
点赞 0
评论 0
public Boolean updatePASAllergies(PatientRefVo patient,IfPatientAllergyVoCollection allergiesFromMsg) throws StaleObjectException
{
DomainFactory factory = getDomainFactory();
if(patient==null||allergiesFromMsg==null) //http://jira/browse/WDEV-17335
return null;
List<PatientAllergy> currentAllergies = listPatientAllergies(patient, false);
if(allergiesFromMsg.size()==0) //set all allergies that have PAS as sourrce of information set them to be not currently active
{
inactivatePASAllergies(currentAllergies,factory);
}
else
{
for (IfPatientAllergyVo msgAllergy : allergiesFromMsg)
{
PatientAllergy alle = getFromList(currentAllergies,msgAllergy);
if(alle==null)
{
alle = IfPatientAllergyVoAssembler.extractPatientAllergy(factory, msgAllergy);
alle.setPatient((Patient)factory.getDomainObject(Patient.class, patient.getID_Patient()));
alle.setAllergenDescription(alle.getAllergen().getAllergenName());
factory.save(alle);
}
else if(alle.isIsCurrentlyActiveAllergy()==null //if it is null or different in the BO
||(alle.isIsCurrentlyActiveAllergy()!=null
&&msgAllergy.getIsCurrentlyActiveAllergyIsNotNull()
&&(!alle.isIsCurrentlyActiveAllergy().equals(msgAllergy.getIsCurrentlyActiveAllergy()))))
{
alle.setIsCurrentlyActiveAllergy(msgAllergy.getIsCurrentlyActiveAllergy());
factory.save(alle);
}
}
updatePatientNoAllergyInfo(patient); //http://jira/browse/WDEV-17262
}
return null;
}
AllergiesImpl.java 文件源码
项目:openMAXIMS
阅读 22
收藏 0
点赞 0
评论 0
public Boolean updatePASAllergies(PatientRefVo patient,IfPatientAllergyVoCollection allergiesFromMsg) throws StaleObjectException
{
DomainFactory factory = getDomainFactory();
if(patient==null||allergiesFromMsg==null) //http://jira/browse/WDEV-17335
return null;
List<PatientAllergy> currentAllergies = listPatientAllergies(patient, false);
if(allergiesFromMsg.size()==0) //set all allergies that have PAS as sourrce of information set them to be not currently active
{
inactivatePASAllergies(currentAllergies,factory);
}
else
{
for (IfPatientAllergyVo msgAllergy : allergiesFromMsg)
{
PatientAllergy alle = getFromList(currentAllergies,msgAllergy);
if(alle==null)
{
alle = IfPatientAllergyVoAssembler.extractPatientAllergy(factory, msgAllergy);
alle.setPatient((Patient)factory.getDomainObject(Patient.class, patient.getID_Patient()));
alle.setAllergenDescription(alle.getAllergen().getAllergenName());
factory.save(alle);
}
else if(alle.isIsCurrentlyActiveAllergy()==null //if it is null or different in the BO
||(alle.isIsCurrentlyActiveAllergy()!=null
&&msgAllergy.getIsCurrentlyActiveAllergyIsNotNull()
&&(!alle.isIsCurrentlyActiveAllergy().equals(msgAllergy.getIsCurrentlyActiveAllergy()))))
{
alle.setIsCurrentlyActiveAllergy(msgAllergy.getIsCurrentlyActiveAllergy());
factory.save(alle);
}
}
updatePatientNoAllergyInfo(patient); //http://jira/browse/WDEV-17262
}
return null;
}
AllergiesImpl.java 文件源码
项目:openMAXIMS
阅读 25
收藏 0
点赞 0
评论 0
public Boolean updatePASAllergies(PatientRefVo patient,IfPatientAllergyVoCollection allergiesFromMsg) throws StaleObjectException
{
DomainFactory factory = getDomainFactory();
if(patient==null||allergiesFromMsg==null) //http://jira/browse/WDEV-17335
return null;
List<PatientAllergy> currentAllergies = listPatientAllergies(patient, false);
if(allergiesFromMsg.size()==0) //set all allergies that have PAS as sourrce of information set them to be not currently active
{
inactivatePASAllergies(currentAllergies,factory);
}
else
{
for (IfPatientAllergyVo msgAllergy : allergiesFromMsg)
{
PatientAllergy alle = getFromList(currentAllergies,msgAllergy);
if(alle==null)
{
alle = IfPatientAllergyVoAssembler.extractPatientAllergy(factory, msgAllergy);
alle.setPatient((Patient)factory.getDomainObject(Patient.class, patient.getID_Patient()));
alle.setAllergenDescription(alle.getAllergen().getAllergenName());
factory.save(alle);
}
else if(alle.isIsCurrentlyActiveAllergy()==null //if it is null or different in the BO
||(alle.isIsCurrentlyActiveAllergy()!=null
&&msgAllergy.getIsCurrentlyActiveAllergyIsNotNull()
&&(!alle.isIsCurrentlyActiveAllergy().equals(msgAllergy.getIsCurrentlyActiveAllergy()))))
{
alle.setIsCurrentlyActiveAllergy(msgAllergy.getIsCurrentlyActiveAllergy());
factory.save(alle);
}
}
updatePatientNoAllergyInfo(patient); //http://jira/browse/WDEV-17262
}
return null;
}
AllergiesImpl.java 文件源码
项目:openmaxims-linux
阅读 23
收藏 0
点赞 0
评论 0
public Boolean updatePASAllergies(PatientRefVo patient,IfPatientAllergyVoCollection allergiesFromMsg) throws StaleObjectException
{
DomainFactory factory = getDomainFactory();
if(patient==null||allergiesFromMsg==null) //http://jira/browse/WDEV-17335
return null;
List<PatientAllergy> currentAllergies = listPatientAllergies(patient, false);
if(allergiesFromMsg.size()==0) //set all allergies that have PAS as sourrce of information set them to be not currently active
{
inactivatePASAllergies(currentAllergies,factory);
}
else
{
for (IfPatientAllergyVo msgAllergy : allergiesFromMsg)
{
PatientAllergy alle = getFromList(currentAllergies,msgAllergy);
if(alle==null)
{
alle = IfPatientAllergyVoAssembler.extractPatientAllergy(factory, msgAllergy);
alle.setPatient((Patient)factory.getDomainObject(Patient.class, patient.getID_Patient()));
alle.setAllergenDescription(alle.getAllergen().getAllergenName());
factory.save(alle);
}
else if(alle.isIsCurrentlyActiveAllergy()==null //if it is null or different in the BO
||(alle.isIsCurrentlyActiveAllergy()!=null
&&msgAllergy.getIsCurrentlyActiveAllergyIsNotNull()
&&(!alle.isIsCurrentlyActiveAllergy().equals(msgAllergy.getIsCurrentlyActiveAllergy()))))
{
alle.setIsCurrentlyActiveAllergy(msgAllergy.getIsCurrentlyActiveAllergy());
factory.save(alle);
}
}
updatePatientNoAllergyInfo(patient); //http://jira/browse/WDEV-17262
}
return null;
}