public SocialHistoryVo getSocialHistoryByCareContext(CareContextRefVo voCareContextRef)
{
if(voCareContextRef == null)
throw new CodingRuntimeException("Contact not Provided");
DomainFactory factory = getDomainFactory();
//the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
List socialHistory = factory.find(" from SocialHistory sc where sc.careContext.id = :idCareContext order by sc.systemInformation.creationDateTime desc )",
new String[]{"idCareContext" },
new Object[]{ voCareContextRef.getID_CareContext()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory.get(0);
else
return null;
}
java类ims.core.vo.domain.SocialHistoryVoAssembler的实例源码
SocialHistoryImpl.java 文件源码
项目:AvoinApotti
阅读 24
收藏 0
点赞 0
评论 0
SocialHistoryImpl.java 文件源码
项目:AvoinApotti
阅读 28
收藏 0
点赞 0
评论 0
public SocialHistoryVoCollection getSocialHistoryByCareContextCollection( CareContextRefVo voCareContextRef)
{
if(voCareContextRef == null)
throw new CodingRuntimeException("Contact not Provided");
DomainFactory factory = getDomainFactory();
//the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
List socialHistory = factory.find(" from SocialHistory sc where sc.careContext.id = :idCareContext ",
new String[]{"idCareContext" },
new Object[]{ voCareContextRef.getID_CareContext()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory;
else
return null;
}
SocialHistoryImpl.java 文件源码
项目:AvoinApotti
阅读 31
收藏 0
点赞 0
评论 0
public SocialHistoryVo getSocialHistoryById(SocialHistoryRefVo socialhostoryref)
{
if(socialhostoryref == null || !socialhostoryref.getID_SocialHistoryIsNotNull())
return null;
DomainFactory factory = getDomainFactory();
List socialHistory = factory.find(" from SocialHistory sc where sc.id = :idSocialHistory ",
new String[]{"idSocialHistory" },
new Object[]{ socialhostoryref.getID_SocialHistory()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory.get(0);
else
return null;
}
SocialHistoryImpl.java 文件源码
项目:openMAXIMS
阅读 39
收藏 0
点赞 0
评论 0
public SocialHistoryVo getSocialHistoryByCareContext(CareContextRefVo voCareContextRef)
{
if(voCareContextRef == null)
throw new CodingRuntimeException("Contact not Provided");
DomainFactory factory = getDomainFactory();
//the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
List socialHistory = factory.find(" from SocialHistory sc where sc.careContext.id = :idCareContext order by sc.systemInformation.creationDateTime desc )",
new String[]{"idCareContext" },
new Object[]{ voCareContextRef.getID_CareContext()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory.get(0);
else
return null;
}
SocialHistoryImpl.java 文件源码
项目:openMAXIMS
阅读 28
收藏 0
点赞 0
评论 0
public SocialHistoryVoCollection getSocialHistoryByCareContextCollection( CareContextRefVo voCareContextRef)
{
if(voCareContextRef == null)
throw new CodingRuntimeException("Contact not Provided");
DomainFactory factory = getDomainFactory();
//the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
List socialHistory = factory.find(" from SocialHistory sc where sc.careContext.id = :idCareContext ",
new String[]{"idCareContext" },
new Object[]{ voCareContextRef.getID_CareContext()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory;
else
return null;
}
SocialHistoryImpl.java 文件源码
项目:openMAXIMS
阅读 27
收藏 0
点赞 0
评论 0
public SocialHistoryVo getSocialHistoryById(SocialHistoryRefVo socialhostoryref)
{
if(socialhostoryref == null || !socialhostoryref.getID_SocialHistoryIsNotNull())
return null;
DomainFactory factory = getDomainFactory();
List socialHistory = factory.find(" from SocialHistory sc where sc.id = :idSocialHistory ",
new String[]{"idSocialHistory" },
new Object[]{ socialhostoryref.getID_SocialHistory()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory.get(0);
else
return null;
}
SocialHistoryImpl.java 文件源码
项目:openMAXIMS
阅读 27
收藏 0
点赞 0
评论 0
public SocialHistoryVo getSocialHistoryByCareContext(CareContextRefVo voCareContextRef)
{
if(voCareContextRef == null)
throw new CodingRuntimeException("Contact not Provided");
DomainFactory factory = getDomainFactory();
//the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
List socialHistory = factory.find(" from SocialHistory sc where sc.careContext.id = :idCareContext order by sc.systemInformation.creationDateTime desc )",
new String[]{"idCareContext" },
new Object[]{ voCareContextRef.getID_CareContext()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory.get(0);
else
return null;
}
SocialHistoryImpl.java 文件源码
项目:openMAXIMS
阅读 31
收藏 0
点赞 0
评论 0
public SocialHistoryVoCollection getSocialHistoryByCareContextCollection( CareContextRefVo voCareContextRef)
{
if(voCareContextRef == null)
throw new CodingRuntimeException("Contact not Provided");
DomainFactory factory = getDomainFactory();
//the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
List socialHistory = factory.find(" from SocialHistory sc where sc.careContext.id = :idCareContext ",
new String[]{"idCareContext" },
new Object[]{ voCareContextRef.getID_CareContext()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory;
else
return null;
}
SocialHistoryImpl.java 文件源码
项目:openMAXIMS
阅读 39
收藏 0
点赞 0
评论 0
public SocialHistoryVo getSocialHistoryById(SocialHistoryRefVo socialhostoryref)
{
if(socialhostoryref == null || !socialhostoryref.getID_SocialHistoryIsNotNull())
return null;
DomainFactory factory = getDomainFactory();
List socialHistory = factory.find(" from SocialHistory sc where sc.id = :idSocialHistory ",
new String[]{"idSocialHistory" },
new Object[]{ socialhostoryref.getID_SocialHistory()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory.get(0);
else
return null;
}
SocialHistoryImpl.java 文件源码
项目:openmaxims-linux
阅读 30
收藏 0
点赞 0
评论 0
public SocialHistoryVo getSocialHistoryByCareContext(CareContextRefVo voCareContextRef)
{
if(voCareContextRef == null)
throw new CodingRuntimeException("Contact not Provided");
DomainFactory factory = getDomainFactory();
//the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
List socialHistory = factory.find(" from SocialHistory sc where sc.careContext.id = :idCareContext order by sc.systemInformation.creationDateTime desc )",
new String[]{"idCareContext" },
new Object[]{ voCareContextRef.getID_CareContext()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory.get(0);
else
return null;
}
SocialHistoryImpl.java 文件源码
项目:openmaxims-linux
阅读 32
收藏 0
点赞 0
评论 0
public SocialHistoryVoCollection getSocialHistoryByCareContextCollection( CareContextRefVo voCareContextRef)
{
if(voCareContextRef == null)
throw new CodingRuntimeException("Contact not Provided");
DomainFactory factory = getDomainFactory();
//the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
List socialHistory = factory.find(" from SocialHistory sc where sc.careContext.id = :idCareContext ",
new String[]{"idCareContext" },
new Object[]{ voCareContextRef.getID_CareContext()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory;
else
return null;
}
SocialHistoryImpl.java 文件源码
项目:openmaxims-linux
阅读 34
收藏 0
点赞 0
评论 0
public SocialHistoryVo getSocialHistoryById(SocialHistoryRefVo socialhostoryref)
{
if(socialhostoryref == null || !socialhostoryref.getID_SocialHistoryIsNotNull())
return null;
DomainFactory factory = getDomainFactory();
List socialHistory = factory.find(" from SocialHistory sc where sc.id = :idSocialHistory ",
new String[]{"idSocialHistory" },
new Object[]{ socialhostoryref.getID_SocialHistory()});
SocialHistoryVoCollection voCollSocialHistory = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socialHistory);
if(voCollSocialHistory.size()>0)
return voCollSocialHistory.get(0);
else
return null;
}
OPDEDClinicNotesImpl.java 文件源码
项目:AvoinApotti
阅读 39
收藏 0
点赞 0
评论 0
public SocialHistoryVo getMedSocialHistory(ClinicalContactShortVo voClinicalContactShort)
{
SocialHistoryVoCollection voCollSocHist = new SocialHistoryVoCollection();
DomainFactory factory = getDomainFactory();
String hql = " from SocialHistory socHist ";
StringBuffer condStr = new StringBuffer();
String andStr = " ";
ArrayList markers = new ArrayList();
ArrayList values = new ArrayList();
if (voClinicalContactShort.getID_ClinicalContactIsNotNull())
{
condStr.append(andStr + " socHist.clinicalContact.id = :id_ClinicalContact");
markers.add("id_ClinicalContact");
values.add(voClinicalContactShort.getID_ClinicalContact().toString());
andStr = " and ";
}
if (andStr.equals(" and "))
hql += " where ";
hql += condStr.toString();
voCollSocHist = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(factory.find(hql, markers, values));
if (voCollSocHist.size() > 0)
return voCollSocHist.get(0);
else
return null;
}
OPDEDClinicNotesImpl.java 文件源码
项目:AvoinApotti
阅读 27
收藏 0
点赞 0
评论 0
public void saveMedSocialHistory(SocialHistoryVo voSocialHistory) throws StaleObjectException
{
// Ensure the value object has been validated
if (!voSocialHistory.isValidated())
throw new DomainRuntimeException("Social History has not been validated");
DomainFactory factory = getDomainFactory();
SocialHistory doSocHist = SocialHistoryVoAssembler.extractSocialHistory(factory, voSocialHistory);
factory.save(doSocHist);
return;
}
OPDEDClinicNotesImpl.java 文件源码
项目:AvoinApotti
阅读 25
收藏 0
点赞 0
评论 0
public SocialHistoryVo getMedSocialHistoryByCareContext(CareContextLiteVo voCareContext)
{
DomainFactory factory = getDomainFactory();
StringBuffer hql = new StringBuffer();
String query = " from SocialHistory socHist ";
ArrayList markers= new ArrayList();
ArrayList values = new ArrayList();
String andStr = " ";
if(voCareContext.getEpisodeOfCareIsNotNull())
{
hql.append(andStr + " socHist.careContext.id = :ec");
markers.add("ec");
values.add(voCareContext.getID_CareContext());
andStr = " and ";
}
if (markers.size() > 0) query += " where ";
query += hql.toString();
query += " and socHist.isRIE is null";
java.util.List socHistList = factory.find(query,markers,values);
SocialHistoryVoCollection voCollSocHist = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socHistList);
if(voCollSocHist.size()>0)
return voCollSocHist.get(0);
else
return null;
}
OPDFertilityCLinicImpl.java 文件源码
项目:AvoinApotti
阅读 28
收藏 0
点赞 0
评论 0
public void saveMedSocialHistory(SocialHistoryVo voSocialHistory) throws StaleObjectException
{
// Ensure the value object has been validated
if (!voSocialHistory.isValidated())
throw new DomainRuntimeException("Social History has not been validated");
DomainFactory factory = getDomainFactory();
SocialHistory doSocHist = SocialHistoryVoAssembler.extractSocialHistory(factory, voSocialHistory);
factory.save(doSocHist);
return;
}
SocialHistoryImpl.java 文件源码
项目:AvoinApotti
阅读 54
收藏 0
点赞 0
评论 0
public SocialHistoryVo saveSocialHistory(SocialHistoryVo voSocialHistory) throws StaleObjectException
{
if(voSocialHistory == null || !voSocialHistory.isValidated())
throw new CodingRuntimeException("Social History Value Object is null or has not been validated");
if (voSocialHistory.getID_SocialHistory() == null && getSocialHistoryByCareContext(voSocialHistory.getCareContext()) != null)
throw new StaleObjectException(null, "A Social History record already exists for this Care Context, the screen will be refreshed.");
DomainFactory factory = getDomainFactory();
SocialHistory domSocialHistory = SocialHistoryVoAssembler.extractSocialHistory(factory,voSocialHistory);
factory.save(domSocialHistory);
return SocialHistoryVoAssembler.create(domSocialHistory);
}
SocialHistoryImpl.java 文件源码
项目:AvoinApotti
阅读 30
收藏 0
点赞 0
评论 0
public SocialHistoryVo getSocialHistoryByPatient(PatientRefVo patient)
{
if(patient == null || patient.getID_Patient() == null)
throw new CodingRuntimeException("Patient not Provided to retrive Core Clinical - Social History record");
DomainFactory factory = getDomainFactory();
String hql = "from SocialHistory socHist where socHist.careContext.episodeOfCare.careSpell.patient.id = :idPatient order by socHist.systemInformation.creationDateTime desc";
List socialHistory = factory.find(hql, new String[] {"idPatient"}, new Object[] {patient.getID_Patient()});
if (socialHistory != null && socialHistory.size() > 0)
return SocialHistoryVoAssembler.create((SocialHistory) socialHistory.get(0));
return null;
}
OPDEDClinicNotesImpl.java 文件源码
项目:openMAXIMS
阅读 22
收藏 0
点赞 0
评论 0
public SocialHistoryVo getMedSocialHistory(ClinicalContactShortVo voClinicalContactShort)
{
SocialHistoryVoCollection voCollSocHist = new SocialHistoryVoCollection();
DomainFactory factory = getDomainFactory();
String hql = " from SocialHistory socHist ";
StringBuffer condStr = new StringBuffer();
String andStr = " ";
ArrayList markers = new ArrayList();
ArrayList values = new ArrayList();
if (voClinicalContactShort.getID_ClinicalContactIsNotNull())
{
condStr.append(andStr + " socHist.clinicalContact.id = :id_ClinicalContact");
markers.add("id_ClinicalContact");
values.add(voClinicalContactShort.getID_ClinicalContact().toString());
andStr = " and ";
}
if (andStr.equals(" and "))
hql += " where ";
hql += condStr.toString();
voCollSocHist = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(factory.find(hql, markers, values));
if (voCollSocHist.size() > 0)
return voCollSocHist.get(0);
else
return null;
}
OPDEDClinicNotesImpl.java 文件源码
项目:openMAXIMS
阅读 24
收藏 0
点赞 0
评论 0
public void saveMedSocialHistory(SocialHistoryVo voSocialHistory) throws StaleObjectException
{
// Ensure the value object has been validated
if (!voSocialHistory.isValidated())
throw new DomainRuntimeException("Social History has not been validated");
DomainFactory factory = getDomainFactory();
SocialHistory doSocHist = SocialHistoryVoAssembler.extractSocialHistory(factory, voSocialHistory);
factory.save(doSocHist);
return;
}
OPDEDClinicNotesImpl.java 文件源码
项目:openMAXIMS
阅读 24
收藏 0
点赞 0
评论 0
public SocialHistoryVo getMedSocialHistoryByCareContext(CareContextLiteVo voCareContext)
{
DomainFactory factory = getDomainFactory();
StringBuffer hql = new StringBuffer();
String query = " from SocialHistory socHist ";
ArrayList markers= new ArrayList();
ArrayList values = new ArrayList();
String andStr = " ";
if(voCareContext.getEpisodeOfCareIsNotNull())
{
hql.append(andStr + " socHist.careContext.id = :ec");
markers.add("ec");
values.add(voCareContext.getID_CareContext());
andStr = " and ";
}
if (markers.size() > 0) query += " where ";
query += hql.toString();
query += " and socHist.isRIE is null";
java.util.List socHistList = factory.find(query,markers,values);
SocialHistoryVoCollection voCollSocHist = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socHistList);
if(voCollSocHist.size()>0)
return voCollSocHist.get(0);
else
return null;
}
OPDFertilityCLinicImpl.java 文件源码
项目:openMAXIMS
阅读 25
收藏 0
点赞 0
评论 0
public void saveMedSocialHistory(SocialHistoryVo voSocialHistory) throws StaleObjectException
{
// Ensure the value object has been validated
if (!voSocialHistory.isValidated())
throw new DomainRuntimeException("Social History has not been validated");
DomainFactory factory = getDomainFactory();
SocialHistory doSocHist = SocialHistoryVoAssembler.extractSocialHistory(factory, voSocialHistory);
factory.save(doSocHist);
return;
}
SocialHistoryImpl.java 文件源码
项目:openMAXIMS
阅读 31
收藏 0
点赞 0
评论 0
public SocialHistoryVo saveSocialHistory(SocialHistoryVo voSocialHistory) throws StaleObjectException
{
if(voSocialHistory == null || !voSocialHistory.isValidated())
throw new CodingRuntimeException("Social History Value Object is null or has not been validated");
if (voSocialHistory.getID_SocialHistory() == null && getSocialHistoryByCareContext(voSocialHistory.getCareContext()) != null)
throw new StaleObjectException(null, "A Social History record already exists for this Care Context, the screen will be refreshed.");
DomainFactory factory = getDomainFactory();
SocialHistory domSocialHistory = SocialHistoryVoAssembler.extractSocialHistory(factory,voSocialHistory);
factory.save(domSocialHistory);
return SocialHistoryVoAssembler.create(domSocialHistory);
}
SocialHistoryImpl.java 文件源码
项目:openMAXIMS
阅读 29
收藏 0
点赞 0
评论 0
public SocialHistoryVo getSocialHistoryByPatient(PatientRefVo patient)
{
if(patient == null || patient.getID_Patient() == null)
throw new CodingRuntimeException("Patient not Provided to retrive Core Clinical - Social History record");
DomainFactory factory = getDomainFactory();
String hql = "from SocialHistory socHist where socHist.careContext.episodeOfCare.careSpell.patient.id = :idPatient order by socHist.systemInformation.creationDateTime desc";
List socialHistory = factory.find(hql, new String[] {"idPatient"}, new Object[] {patient.getID_Patient()});
if (socialHistory != null && socialHistory.size() > 0)
return SocialHistoryVoAssembler.create((SocialHistory) socialHistory.get(0));
return null;
}
OPDEDClinicNotesImpl.java 文件源码
项目:openMAXIMS
阅读 30
收藏 0
点赞 0
评论 0
public SocialHistoryVo getMedSocialHistory(ClinicalContactShortVo voClinicalContactShort)
{
SocialHistoryVoCollection voCollSocHist = new SocialHistoryVoCollection();
DomainFactory factory = getDomainFactory();
String hql = " from SocialHistory socHist ";
StringBuffer condStr = new StringBuffer();
String andStr = " ";
ArrayList markers = new ArrayList();
ArrayList values = new ArrayList();
if (voClinicalContactShort.getID_ClinicalContactIsNotNull())
{
condStr.append(andStr + " socHist.clinicalContact.id = :id_ClinicalContact");
markers.add("id_ClinicalContact");
values.add(voClinicalContactShort.getID_ClinicalContact().toString());
andStr = " and ";
}
if (andStr.equals(" and "))
hql += " where ";
hql += condStr.toString();
voCollSocHist = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(factory.find(hql, markers, values));
if (voCollSocHist.size() > 0)
return voCollSocHist.get(0);
else
return null;
}
OPDEDClinicNotesImpl.java 文件源码
项目:openMAXIMS
阅读 32
收藏 0
点赞 0
评论 0
public void saveMedSocialHistory(SocialHistoryVo voSocialHistory) throws StaleObjectException
{
// Ensure the value object has been validated
if (!voSocialHistory.isValidated())
throw new DomainRuntimeException("Social History has not been validated");
DomainFactory factory = getDomainFactory();
SocialHistory doSocHist = SocialHistoryVoAssembler.extractSocialHistory(factory, voSocialHistory);
factory.save(doSocHist);
return;
}
OPDEDClinicNotesImpl.java 文件源码
项目:openMAXIMS
阅读 28
收藏 0
点赞 0
评论 0
public SocialHistoryVo getMedSocialHistoryByCareContext(CareContextLiteVo voCareContext)
{
DomainFactory factory = getDomainFactory();
StringBuffer hql = new StringBuffer();
String query = " from SocialHistory socHist ";
ArrayList markers= new ArrayList();
ArrayList values = new ArrayList();
String andStr = " ";
if(voCareContext.getEpisodeOfCareIsNotNull())
{
hql.append(andStr + " socHist.careContext.id = :ec");
markers.add("ec");
values.add(voCareContext.getID_CareContext());
andStr = " and ";
}
if (markers.size() > 0) query += " where ";
query += hql.toString();
query += " and socHist.isRIE is null";
java.util.List socHistList = factory.find(query,markers,values);
SocialHistoryVoCollection voCollSocHist = SocialHistoryVoAssembler.createSocialHistoryVoCollectionFromSocialHistory(socHistList);
if(voCollSocHist.size()>0)
return voCollSocHist.get(0);
else
return null;
}
OPDFertilityCLinicImpl.java 文件源码
项目:openMAXIMS
阅读 31
收藏 0
点赞 0
评论 0
public void saveMedSocialHistory(SocialHistoryVo voSocialHistory) throws StaleObjectException
{
// Ensure the value object has been validated
if (!voSocialHistory.isValidated())
throw new DomainRuntimeException("Social History has not been validated");
DomainFactory factory = getDomainFactory();
SocialHistory doSocHist = SocialHistoryVoAssembler.extractSocialHistory(factory, voSocialHistory);
factory.save(doSocHist);
return;
}
SocialHistoryImpl.java 文件源码
项目:openMAXIMS
阅读 37
收藏 0
点赞 0
评论 0
public SocialHistoryVo saveSocialHistory(SocialHistoryVo voSocialHistory) throws StaleObjectException
{
if(voSocialHistory == null || !voSocialHistory.isValidated())
throw new CodingRuntimeException("Social History Value Object is null or has not been validated");
if (voSocialHistory.getID_SocialHistory() == null && getSocialHistoryByCareContext(voSocialHistory.getCareContext()) != null)
throw new StaleObjectException(null, "A Social History record already exists for this Care Context, the screen will be refreshed.");
DomainFactory factory = getDomainFactory();
SocialHistory domSocialHistory = SocialHistoryVoAssembler.extractSocialHistory(factory,voSocialHistory);
factory.save(domSocialHistory);
return SocialHistoryVoAssembler.create(domSocialHistory);
}
SocialHistoryImpl.java 文件源码
项目:openMAXIMS
阅读 30
收藏 0
点赞 0
评论 0
public SocialHistoryVo getSocialHistoryByPatient(PatientRefVo patient)
{
if(patient == null || patient.getID_Patient() == null)
throw new CodingRuntimeException("Patient not Provided to retrive Core Clinical - Social History record");
DomainFactory factory = getDomainFactory();
String hql = "from SocialHistory socHist where socHist.careContext.episodeOfCare.careSpell.patient.id = :idPatient order by socHist.systemInformation.creationDateTime desc";
List socialHistory = factory.find(hql, new String[] {"idPatient"}, new Object[] {patient.getID_Patient()});
if (socialHistory != null && socialHistory.size() > 0)
return SocialHistoryVoAssembler.create((SocialHistory) socialHistory.get(0));
return null;
}