public class HibernateDiagnosisDAO extends Object implements DiagnosisDAO
DiagnosisDAO
,
DiagnosisService
Constructor and Description |
---|
HibernateDiagnosisDAO() |
Modifier and Type | Method and Description |
---|---|
void |
deleteDiagnosis(Diagnosis diagnosis)
Completely remove a diagnosis from the database.
|
void |
deleteDiagnosisAttributeType(DiagnosisAttributeType diagnosisAttributeType) |
List<Diagnosis> |
getActiveDiagnoses(Patient patient,
Date fromDate)
Gets all active diagnoses related to the specified patient.
|
List<DiagnosisAttributeType> |
getAllDiagnosisAttributeTypes() |
List<Diagnosis> |
getDiagnosesByEncounter(Encounter encounter,
boolean primaryOnly,
boolean confirmedOnly) |
List<Diagnosis> |
getDiagnosesByVisit(Visit visit,
boolean primaryOnly,
boolean confirmedOnly) |
DiagnosisAttribute |
getDiagnosisAttributeByUuid(String uuid) |
DiagnosisAttributeType |
getDiagnosisAttributeTypeById(Integer id) |
DiagnosisAttributeType |
getDiagnosisAttributeTypeByUuid(String uuid) |
Diagnosis |
getDiagnosisById(Integer diagnosisId)
Gets a diagnosis from database using the diagnosis id
|
Diagnosis |
getDiagnosisByUuid(String uuid)
Gets the diagnosis attached to the specified UUID.
|
Diagnosis |
saveDiagnosis(Diagnosis diagnosis)
Saves the diagnosis.
|
DiagnosisAttributeType |
saveDiagnosisAttributeType(DiagnosisAttributeType diagnosisAttributeType) |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set session factory
|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public Diagnosis saveDiagnosis(Diagnosis diagnosis)
saveDiagnosis
in interface DiagnosisDAO
diagnosis
- the diagnosis to save.public List<Diagnosis> getActiveDiagnoses(Patient patient, Date fromDate)
getActiveDiagnoses
in interface DiagnosisDAO
patient
- the patient whose active diagnoses are being queried.fromDate
- the start date for the check of active diagnosispublic List<Diagnosis> getDiagnosesByEncounter(Encounter encounter, boolean primaryOnly, boolean confirmedOnly)
getDiagnosesByEncounter
in interface DiagnosisDAO
DiagnosisDAO.getDiagnosesByEncounter(Encounter, boolean, boolean)
public List<Diagnosis> getDiagnosesByVisit(Visit visit, boolean primaryOnly, boolean confirmedOnly)
getDiagnosesByVisit
in interface DiagnosisDAO
DiagnosisDAO.getDiagnosesByVisit(Visit, boolean, boolean)
public Diagnosis getDiagnosisById(Integer diagnosisId)
getDiagnosisById
in interface DiagnosisDAO
diagnosisId
- the id of the diagnosis to look forpublic Diagnosis getDiagnosisByUuid(String uuid)
getDiagnosisByUuid
in interface DiagnosisDAO
uuid
- the uuid to search for in the database.public void deleteDiagnosis(Diagnosis diagnosis) throws DAOException
deleteDiagnosis
in interface DiagnosisDAO
diagnosis
- diagnosis to remove from the databaseDAOException
- exception thrown if error occurs while deleting the diagnosis@Transactional(readOnly=true) public List<DiagnosisAttributeType> getAllDiagnosisAttributeTypes() throws DAOException
getAllDiagnosisAttributeTypes
in interface DiagnosisDAO
DAOException
DiagnosisDAO.getAllDiagnosisAttributeTypes()
@Transactional(readOnly=true) public DiagnosisAttributeType getDiagnosisAttributeTypeById(Integer id) throws DAOException
getDiagnosisAttributeTypeById
in interface DiagnosisDAO
DAOException
DiagnosisDAO.getDiagnosisAttributeTypeById(Integer)
@Transactional(readOnly=true) public DiagnosisAttributeType getDiagnosisAttributeTypeByUuid(String uuid) throws DAOException
getDiagnosisAttributeTypeByUuid
in interface DiagnosisDAO
DAOException
DiagnosisDAO.getDiagnosisAttributeTypeByUuid(String)
@Transactional public DiagnosisAttributeType saveDiagnosisAttributeType(DiagnosisAttributeType diagnosisAttributeType) throws DAOException
saveDiagnosisAttributeType
in interface DiagnosisDAO
DAOException
DiagnosisDAO.saveDiagnosisAttributeType(DiagnosisAttributeType)
@Transactional public void deleteDiagnosisAttributeType(DiagnosisAttributeType diagnosisAttributeType) throws DAOException
deleteDiagnosisAttributeType
in interface DiagnosisDAO
DAOException
DiagnosisDAO.deleteDiagnosisAttributeType(DiagnosisAttributeType)
@Transactional(readOnly=true) public DiagnosisAttribute getDiagnosisAttributeByUuid(String uuid) throws DAOException
getDiagnosisAttributeByUuid
in interface DiagnosisDAO
DAOException
DiagnosisDAO.getDiagnosisAttributeByUuid(String)
Copyright © 2024 OpenMRS Inc.. All rights reserved.