This commit is contained in:
parent
e5e6ebcf7d
commit
f02c250767
46
src/main/java/MachineConverter.java
Normal file
46
src/main/java/MachineConverter.java
Normal file
@ -0,0 +1,46 @@
|
||||
import com.triz.trizservice.modeles.Machine;
|
||||
import com.triz.trizservice.service.TransactionService;
|
||||
import java.util.UUID;
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.convert.FacesConverter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@FacesConverter("machineConverter")
|
||||
@Component
|
||||
public class MachineConverter implements Converter {
|
||||
|
||||
@Autowired
|
||||
protected transient TransactionService service;
|
||||
|
||||
@Override
|
||||
public Object getAsObject(FacesContext fc, UIComponent uic, String value) {
|
||||
if (value == null || value.trim().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
UUID uuid = UUID.fromString(value.trim());
|
||||
return service.findById(Machine.class, uuid);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// valeur non-UUID (ex: option "Sélectionner" mal sérialisée) -> pas de sélection
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAsString(FacesContext fc, UIComponent uic, Object object) {
|
||||
if (object == null) {
|
||||
return "";
|
||||
}
|
||||
if (object instanceof Machine) {
|
||||
Machine machine = (Machine) object;
|
||||
if (machine.getId() == null) {
|
||||
return "";
|
||||
}
|
||||
return machine.getId().toString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@ -72,6 +72,7 @@ public class FormMedecinBean {
|
||||
listeHistoriqueConsultation = service.getAllConsultationByMedecin(selectedMedecin);
|
||||
listSelectedSepecialite = service.getAllSpecialitiesByMedecin(selectedMedecin);
|
||||
listeUsers = service.getAllUserByCentreNotInMedecinByUser(centre, selectedMedecin);
|
||||
context.saveNewManipulation("medecin", selectedMedecin.getId().toString(), "consulter medecin", new Date(), new Date(), user, "", "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ public class FormUserBean {
|
||||
System.out.println("Utilisateur" + userSelected);
|
||||
listeHistCnx = service.getListHistoriqueConnectionByUsers(userSelected);
|
||||
listehistManipulation = service.getListHistoriqueManipulationByUsersByEntreprise(userSelected);
|
||||
confirmationMp = userSelected.getUserpw();
|
||||
confirmationMp = userSelected.getUserPw();
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "consulter user", new Date(), new Date(), user, "", "");
|
||||
} else {
|
||||
if (canEdit) {
|
||||
@ -89,7 +89,7 @@ public class FormUserBean {
|
||||
}
|
||||
|
||||
public String saveUser() {
|
||||
if (userSelected.getUserpw() != null && !userSelected.getUserpw().equals(confirmationMp)) {
|
||||
if (userSelected.getUserPw() != null && !userSelected.getUserPw().equals(confirmationMp)) {
|
||||
FacesContext.getCurrentInstance().addMessage(null,
|
||||
new FacesMessage(FacesMessage.SEVERITY_ERROR,
|
||||
"Les mots de passe ne correspondent pas", null));
|
||||
@ -108,7 +108,7 @@ public class FormUserBean {
|
||||
}
|
||||
ServiceUser oldUser = service.getUserById(user1);
|
||||
if (oldUser != null) {
|
||||
if (userSelected.getUserpw().equalsIgnoreCase(oldUser.getUserpw())) {
|
||||
if (userSelected.getUserPw().equalsIgnoreCase(oldUser.getUserPw())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier pw user", new Date(), new Date(), user, "",
|
||||
"");
|
||||
}
|
||||
@ -289,7 +289,7 @@ public class FormUserBean {
|
||||
return;
|
||||
}
|
||||
|
||||
String pw = userSelected.getUserpw();
|
||||
String pw = userSelected.getUserPw();
|
||||
|
||||
if (pw == null || !pw.equals(confirmationMp)) {
|
||||
context.addMessage(clientId,
|
||||
|
||||
764
src/main/java/com/triz/trizservice/bean/ParametresBean.java
Normal file
764
src/main/java/com/triz/trizservice/bean/ParametresBean.java
Normal file
@ -0,0 +1,764 @@
|
||||
package com.triz.trizservice.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Parametre;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.modeles.TypeExamen;
|
||||
import com.triz.trizservice.modeles.Priority;
|
||||
import com.triz.trizservice.modeles.QueueTips;
|
||||
import com.triz.trizservice.modeles.TypeMachine;
|
||||
import com.triz.trizservice.modeles.SalleDeSoin;
|
||||
import com.triz.trizservice.modeles.TypeAlerteMedical;
|
||||
import com.triz.trizservice.modeles.Wilaya;
|
||||
import com.triz.trizservice.modeles.Machine;
|
||||
import com.triz.trizservice.modeles.MedecinSpecialiste;
|
||||
import com.triz.util.UtilContext;
|
||||
import com.triz.trizservice.modeles.ServiceUser;
|
||||
import com.triz.trizservice.modeles.TypealerteTypeexamen;
|
||||
import com.triz.trizservice.service.TransactionService;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import org.primefaces.PrimeFaces;
|
||||
|
||||
@Component("parametresBean")
|
||||
@Scope("view")
|
||||
public class ParametresBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
private UtilContext utilContext;
|
||||
@Autowired
|
||||
private TransactionService service;
|
||||
|
||||
// ===================== Paramètres de vue =====================
|
||||
private String centre1; // f:viewParam - id du centre a afficher
|
||||
private boolean modifier; // f:viewParam - canEdit
|
||||
private boolean canEdit;
|
||||
|
||||
// ===================== Entité principale =====================
|
||||
private Centre centreSelected;
|
||||
private Parametre parametre;
|
||||
private ServiceUser user;
|
||||
|
||||
// ===================== Listes des onglets =====================
|
||||
private List<SpecialiteMedicale> listeSpecialites;
|
||||
private List<TypeExamen> listeTypesExamen;
|
||||
private List<Priority> listePriorites;
|
||||
private List<QueueTips> listeIndications;
|
||||
private List<TypeMachine> listeTypesMachines;
|
||||
private List<SalleDeSoin> listeSallesDeSoins;
|
||||
private List<TypeAlerteMedical> listeTypesAlerte;
|
||||
|
||||
private List<Wilaya> listeWilayas;
|
||||
private List<Machine> listeMachines;
|
||||
private List<Machine> selectedMachines;
|
||||
private List<TypeExamen> selectedTypeExamen;
|
||||
|
||||
// ===================== Objets "selected" pour les dialogs =====================
|
||||
private SpecialiteMedicale specialiteSelected;
|
||||
private TypeExamen typeExamenSelected;
|
||||
private Priority prioriteSelected;
|
||||
private QueueTips indicationSelected;
|
||||
private TypeMachine typeMachineSelected;
|
||||
private SalleDeSoin salleSelected;
|
||||
private TypeAlerteMedical typeAlerteSelected;
|
||||
|
||||
// =====================================================================
|
||||
// INITIALISATION
|
||||
// =====================================================================
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
this.canEdit = this.modifier;
|
||||
user = utilContext.getCurrentUser();
|
||||
centreSelected = utilContext.getCurrentEtablissement();
|
||||
selectedTypeExamen = new ArrayList<>();
|
||||
if (centreSelected == null) {
|
||||
addErrorMessage("Centre introuvable.");
|
||||
return;
|
||||
}
|
||||
|
||||
parametre = service.getByCentre(Parametre.class, centreSelected);
|
||||
if (parametre == null) {
|
||||
parametre = new Parametre();
|
||||
parametre.setFkCentre(centreSelected);
|
||||
}
|
||||
|
||||
listeWilayas = service.getAllWilaya();
|
||||
listeMachines = service.getAllByCentre(Machine.class, centreSelected);
|
||||
|
||||
chargerToutesLesListes();
|
||||
resetSelections();
|
||||
}
|
||||
|
||||
private void chargerToutesLesListes() {
|
||||
listeSpecialites = service.findAll(SpecialiteMedicale.class);
|
||||
listeTypesExamen = service.findAll(TypeExamen.class);
|
||||
listePriorites = service.findAll(Priority.class);
|
||||
listeIndications = service.findAll(QueueTips.class);
|
||||
listeTypesMachines = service.findAll(TypeMachine.class);
|
||||
listeSallesDeSoins = service.getAllByCentre(SalleDeSoin.class, centreSelected);
|
||||
listeTypesAlerte = service.findAll(TypeAlerteMedical.class);
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// CENTRE - consultation / edition
|
||||
// =====================================================================
|
||||
public void editCentre() {
|
||||
System.out.println("i'mmm heree editCentre");
|
||||
canEdit = true;
|
||||
resetSelections();
|
||||
}
|
||||
|
||||
public void annuler() {
|
||||
canEdit = false;
|
||||
init();
|
||||
}
|
||||
|
||||
public void saveCentre() {
|
||||
System.out.println("saveCentre");
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
System.out.println("!utilControleAccessCheck(\"param\") " + !utilControleAccessCheck("param"));
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Centre ancien = service.findById(Centre.class, centreSelected.getId());
|
||||
System.out.println("ancien " + ancien);
|
||||
System.out.println("centreSelected " + centreSelected.getName());
|
||||
service.save(centreSelected);
|
||||
|
||||
utilContext.saveNewManipulation("Centre", centreSelected.getId().toString(), "modifier Centre", new Date(), new Date(), user, "", "");
|
||||
|
||||
// sauvegarde des paramètres SCP en même temps
|
||||
parametre.setFkCentre(centreSelected);
|
||||
service.save(parametre);
|
||||
|
||||
canEdit = false;
|
||||
addInfoMessage("Paramètres enregistrés avec succès.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Erreur lors de l'enregistrement : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteUser() {
|
||||
// conservé par cohérence de nommage avec le reste de l'app - non utilisé ici
|
||||
}
|
||||
|
||||
public void deleteCentre() {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
service.delete(centreSelected);
|
||||
utilContext.saveNewManipulation("Centre", centreSelected.getId().toString(), "SUPPRESSION Centre", new Date(), new Date(), user, "", "");
|
||||
addInfoMessage("Centre supprimé.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Erreur lors de la suppression : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// SPECIALITES MEDICALES
|
||||
// =====================================================================
|
||||
public void nouvelleSpecialite() {
|
||||
specialiteSelected = new SpecialiteMedicale();
|
||||
}
|
||||
|
||||
public void editerSpecialite(SpecialiteMedicale s) {
|
||||
specialiteSelected = s;
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgSpecialiteContent");
|
||||
}
|
||||
|
||||
public void saveSpecialite() {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
boolean estNouveau = (specialiteSelected.getName() == null
|
||||
|| service.findById(SpecialiteMedicale.class, specialiteSelected.getId()) == null);
|
||||
try {
|
||||
service.save(specialiteSelected);
|
||||
utilContext.saveNewManipulation("specialite_medicale", specialiteSelected.getName(), estNouveau ? "CREATION specialite medicale" : "MODIFICATION specialite medicale", new Date(), new Date(), user, "", "");
|
||||
listeSpecialites = service.findAll(SpecialiteMedicale.class);
|
||||
addInfoMessage("Spécialité enregistrée.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Erreur : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void supprimerSpecialite(SpecialiteMedicale s) {
|
||||
System.out.println("supprimerSpecialite");
|
||||
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
List<MedecinSpecialiste> list = service.getMedecinSpecialisteBySpecialite(s);
|
||||
if (list != null && !list.isEmpty()) {
|
||||
addInfoMessage("Impossible de supprimer (élément référencé ailleurs).");
|
||||
return;
|
||||
}
|
||||
System.out.println("s " + s);
|
||||
service.delete(s);
|
||||
|
||||
utilContext.saveNewManipulation("specialite_medicale", s.getName(), "SUPPRESSION", new Date(), new Date(), user, "", "");
|
||||
listeSpecialites = service.findAll(SpecialiteMedicale.class);
|
||||
addInfoMessage("Spécialité supprimée.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Impossible de supprimer (élément référencé ailleurs).");
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// TYPES D'EXAMEN
|
||||
// =====================================================================
|
||||
public void nouveauTypeExamen() {
|
||||
typeExamenSelected = new TypeExamen();
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgTypeExamenContent");
|
||||
}
|
||||
|
||||
public void editerTypeExamen(TypeExamen t) {
|
||||
System.out.println("modifier dpuis type alerte");
|
||||
typeExamenSelected = t;
|
||||
System.out.println("modifier dpuis type alerte "+t.getNom());
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgTypeExamenContent");
|
||||
}
|
||||
|
||||
public void saveTypeExamen() {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
boolean estNouveau = (typeExamenSelected.getId() == null);
|
||||
try {
|
||||
service.save(typeExamenSelected);
|
||||
utilContext.saveNewManipulation("type_examen", typeExamenSelected.getNom(), "Enregistrer", new Date(), new Date(), user, "", "");
|
||||
listeTypesExamen = service.findAll(TypeExamen.class);
|
||||
addInfoMessage("Type d'examen enregistré.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Erreur : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void supprimerTypeExamen(TypeExamen t) {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
service.delete(t);
|
||||
utilContext.saveNewManipulation("type_examen", t.getNom(), "SUPPRESSION", new Date(), new Date(), user, "", "");
|
||||
listeTypesExamen = service.findAll(TypeExamen.class);
|
||||
addInfoMessage("Type d'examen supprimé.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Impossible de supprimer (élément référencé ailleurs).");
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// PRIORITES
|
||||
// =====================================================================
|
||||
public void nouvellePriorite() {
|
||||
prioriteSelected = new Priority();
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgPrioriteContent");
|
||||
}
|
||||
|
||||
public void editerPriorite(Priority p) {
|
||||
prioriteSelected = p;
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgPrioriteContent");
|
||||
}
|
||||
|
||||
public void savePriorite() {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
boolean estNouveau = (prioriteSelected.getId() == null);
|
||||
try {
|
||||
service.save(prioriteSelected);
|
||||
utilContext.saveNewManipulation("priority", prioriteSelected.getId().toString(), estNouveau ? "CREATION" : "MODIFICATION", new Date(), new Date(), user, "", "");
|
||||
listePriorites = service.findAll(Priority.class);
|
||||
addInfoMessage("Priorité enregistrée.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Erreur : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void supprimerPriorite(Priority p) {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
service.delete(p);
|
||||
utilContext.saveNewManipulation("priority", p.getId().toString(), "SUPPRESSION", new Date(), new Date(), user, "", "");
|
||||
listePriorites = service.findAll(Priority.class);
|
||||
addInfoMessage("Priorité supprimée.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Impossible de supprimer (élément référencé ailleurs).");
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// INDICATIONS FILE D'ATTENTE (queue_tips)
|
||||
// =====================================================================
|
||||
public void nouvelleIndication() {
|
||||
indicationSelected = new QueueTips();
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgIndicationContent");
|
||||
}
|
||||
|
||||
public void editerIndication(QueueTips qt) {
|
||||
indicationSelected = qt;
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgIndicationContent");
|
||||
}
|
||||
|
||||
public void saveIndication() {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
boolean estNouveau = (indicationSelected.getId() == null);
|
||||
try {
|
||||
service.save(indicationSelected);
|
||||
utilContext.saveNewManipulation("queue_tips", indicationSelected.getId().toString(), estNouveau ? "CREATION" : "MODIFICATION", new Date(), new Date(), user, "", "");
|
||||
listeIndications = service.findAll(QueueTips.class);
|
||||
addInfoMessage("Indication enregistrée.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Erreur : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void supprimerIndication(QueueTips qt) {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
service.delete(qt);
|
||||
utilContext.saveNewManipulation("queue_tips", qt.getId().toString(), "SUPPRESSION", new Date(), new Date(), user, "", "");
|
||||
listeIndications = service.findAll(QueueTips.class);
|
||||
addInfoMessage("Indication supprimée.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Impossible de supprimer (élément référencé ailleurs).");
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// TYPES DE MACHINES
|
||||
// =====================================================================
|
||||
public void nouveauTypeMachine() {
|
||||
typeMachineSelected = new TypeMachine();
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgTypeMachineContent");
|
||||
}
|
||||
|
||||
public void editerTypeMachine(TypeMachine tm) {
|
||||
typeMachineSelected = tm;
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgTypeMachineContent");
|
||||
}
|
||||
|
||||
public void saveTypeMachine() {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
boolean estNouveau = (typeMachineSelected.getId() == null);
|
||||
try {
|
||||
service.save(typeMachineSelected);
|
||||
utilContext.saveNewManipulation("type_machine", typeMachineSelected.getId().toString(), estNouveau ? "CREATION" : "MODIFICATION", new Date(), new Date(), user, "", "");
|
||||
listeTypesMachines = service.findAll(TypeMachine.class);
|
||||
addInfoMessage("Type de machine enregistré.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Erreur : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void supprimerTypeMachine(TypeMachine tm) {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
service.delete(tm);
|
||||
utilContext.saveNewManipulation("type_machine", tm.getId().toString(), "SUPPRESSION", new Date(), new Date(), user, "", "");
|
||||
listeTypesMachines = service.findAll(TypeMachine.class);
|
||||
addInfoMessage("Type de machine supprimé.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Impossible de supprimer (élément référencé ailleurs).");
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// SALLES DE SOINS
|
||||
// =====================================================================
|
||||
public void nouvelleSalle() {
|
||||
salleSelected = new SalleDeSoin();
|
||||
salleSelected.setFkCentre(centreSelected);
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgSalleContent");
|
||||
}
|
||||
|
||||
public void editerSalle(SalleDeSoin sl) {
|
||||
salleSelected = sl;
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgSalleContent");
|
||||
}
|
||||
|
||||
public void saveSalle() {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
boolean estNouveau = (salleSelected.getId() == null);
|
||||
try {
|
||||
salleSelected.setFkCentre(centreSelected);
|
||||
service.save(salleSelected);
|
||||
utilContext.saveNewManipulation("salle_de_soin", salleSelected.getId().toString(), estNouveau ? "CREATION" : "MODIFICATION", new Date(), new Date(), user, "", "");
|
||||
listeSallesDeSoins = service.getAllByCentre(SalleDeSoin.class, centreSelected);
|
||||
addInfoMessage("Salle de soins enregistrée.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Erreur : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void supprimerSalle(SalleDeSoin sl) {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
service.delete(sl);
|
||||
utilContext.saveNewManipulation("salle_de_soin", sl.getId().toString(), "SUPPRESSION", new Date(), new Date(), user, "", "");
|
||||
listeSallesDeSoins = service.getAllByCentre(SalleDeSoin.class, centreSelected);
|
||||
addInfoMessage("Salle de soins supprimée.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Impossible de supprimer (élément référencé ailleurs).");
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// TYPE ALERTE MEDICALE
|
||||
// =====================================================================
|
||||
public void nouveauTypeAlerte() {
|
||||
typeAlerteSelected = new TypeAlerteMedical();
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgTypeAlerteContent");
|
||||
}
|
||||
|
||||
public void editerTypeAlerte(TypeAlerteMedical ta) {
|
||||
typeAlerteSelected = ta;
|
||||
selectedTypeExamen=service.getTypeExamenByTypeAlerte(ta);
|
||||
PrimeFaces.current().ajax().update(":parametresForm:dlgTypeAlerteContent");
|
||||
}
|
||||
|
||||
public void saveTypeAlerte() {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
boolean estNouveau = (typeAlerteSelected.getId() == null);
|
||||
try {
|
||||
System.out.println("AVANT SAVE : " + typeAlerteSelected.getId());
|
||||
|
||||
service.save(typeAlerteSelected);
|
||||
|
||||
System.out.println("APRES SAVE : " + typeAlerteSelected.getId());
|
||||
|
||||
List<TypealerteTypeexamen> list
|
||||
= service.getTypeAlerteExamenByTypeAlerte(typeAlerteSelected);
|
||||
|
||||
// Parcourir les examens sélectionnés
|
||||
System.out.println("ALERTE ID = " + typeAlerteSelected.getId());
|
||||
|
||||
System.out.println("NOMBRE EXAMENS SELECTIONNES = "
|
||||
+ getSelectedTypeExamen().size());
|
||||
for (TypeExamen type : selectedTypeExamen) {
|
||||
|
||||
boolean existe = false;
|
||||
|
||||
// Chercher si l'association existe déjà
|
||||
Iterator<TypealerteTypeexamen> iterator = list.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
TypealerteTypeexamen s = iterator.next();
|
||||
|
||||
if (s.getFkExamen().getId().equals(type.getId())) {
|
||||
existe = true;
|
||||
|
||||
// L'association existe déjà,
|
||||
// donc on ne doit pas la recréer.
|
||||
iterator.remove();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
System.out.println("EXAMEN ID = " + type.getId());
|
||||
System.out.println("EXAMEN NOM = " + type.getNom()) ;// L'association n'existe pas encore
|
||||
if (!existe) {
|
||||
TypealerteTypeexamen types = new TypealerteTypeexamen();
|
||||
types.setFkAlerte(typeAlerteSelected);
|
||||
types.setFkExamen(type);
|
||||
|
||||
service.save(types);
|
||||
}
|
||||
}
|
||||
|
||||
// Ce qui reste dans list correspond
|
||||
// aux anciennes associations qui ne sont plus sélectionnées.
|
||||
for (TypealerteTypeexamen s : list) {
|
||||
service.delete(s);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Throwable cause = e;
|
||||
while (cause.getCause() != null) {
|
||||
cause = cause.getCause();
|
||||
}
|
||||
|
||||
addErrorMessage("Erreur : " + cause.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void supprimerTypeAlerte(TypeAlerteMedical ta) {
|
||||
if (!utilControleAccessCheck("param")) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
service.delete(ta);
|
||||
utilContext.saveNewManipulation("type_alerte_medical", ta.getId().toString(), "SUPPRESSION", new Date(), new Date(), user, "", "");
|
||||
listeTypesAlerte = service.findAll(TypeAlerteMedical.class);
|
||||
addInfoMessage("Type d'alerte supprimé.");
|
||||
} catch (Exception e) {
|
||||
addErrorMessage("Impossible de supprimer (élément référencé ailleurs).");
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// UTILITAIRES
|
||||
// =====================================================================
|
||||
private boolean utilControleAccessCheck(String fonctionnalite) {
|
||||
// MODIF : suppose l'existence d'une méthode de vérification équivalente
|
||||
// à utilControleAccess.isshowPrivilegeUpdate/Remove déjà utilisée en xhtml.
|
||||
// A brancher sur ton service réel si le nom diffère.
|
||||
return true;
|
||||
}
|
||||
|
||||
private void addInfoMessage(String message) {
|
||||
FacesContext.getCurrentInstance().addMessage(null,
|
||||
new FacesMessage(FacesMessage.SEVERITY_INFO, message, null));
|
||||
}
|
||||
|
||||
private void addErrorMessage(String message) {
|
||||
FacesContext.getCurrentInstance().addMessage(null,
|
||||
new FacesMessage(FacesMessage.SEVERITY_ERROR, message, null));
|
||||
}
|
||||
|
||||
// =====================================================================
|
||||
// GETTERS / SETTERS
|
||||
// =====================================================================
|
||||
public String getCentre1() {
|
||||
return centre1;
|
||||
}
|
||||
|
||||
public void setCentre1(String centre1) {
|
||||
this.centre1 = centre1;
|
||||
}
|
||||
|
||||
public boolean isModifier() {
|
||||
return modifier;
|
||||
}
|
||||
|
||||
public void setModifier(boolean modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public boolean isCanEdit() {
|
||||
return canEdit;
|
||||
}
|
||||
|
||||
public void setCanEdit(boolean canEdit) {
|
||||
this.canEdit = canEdit;
|
||||
}
|
||||
|
||||
public Centre getCentreSelected() {
|
||||
return centreSelected;
|
||||
}
|
||||
|
||||
public void setCentreSelected(Centre centreSelected) {
|
||||
this.centreSelected = centreSelected;
|
||||
}
|
||||
|
||||
public Parametre getParametre() {
|
||||
return parametre;
|
||||
}
|
||||
|
||||
public void setParametre(Parametre parametre) {
|
||||
this.parametre = parametre;
|
||||
}
|
||||
|
||||
public List<SpecialiteMedicale> getListeSpecialites() {
|
||||
return listeSpecialites;
|
||||
}
|
||||
|
||||
public void setListeSpecialites(List<SpecialiteMedicale> listeSpecialites) {
|
||||
this.listeSpecialites = listeSpecialites;
|
||||
}
|
||||
|
||||
public List<TypeExamen> getListeTypesExamen() {
|
||||
return listeTypesExamen;
|
||||
}
|
||||
|
||||
public void setListeTypesExamen(List<TypeExamen> listeTypesExamen) {
|
||||
this.listeTypesExamen = listeTypesExamen;
|
||||
}
|
||||
|
||||
public List<Priority> getListePriorites() {
|
||||
return listePriorites;
|
||||
}
|
||||
|
||||
public void setListePriorites(List<Priority> listePriorites) {
|
||||
this.listePriorites = listePriorites;
|
||||
}
|
||||
|
||||
public List<QueueTips> getListeIndications() {
|
||||
return listeIndications;
|
||||
}
|
||||
|
||||
public void setListeIndications(List<QueueTips> listeIndications) {
|
||||
this.listeIndications = listeIndications;
|
||||
}
|
||||
|
||||
public List<TypeMachine> getListeTypesMachines() {
|
||||
return listeTypesMachines;
|
||||
}
|
||||
|
||||
public void setListeTypesMachines(List<TypeMachine> listeTypesMachines) {
|
||||
this.listeTypesMachines = listeTypesMachines;
|
||||
}
|
||||
|
||||
public List<SalleDeSoin> getListeSallesDeSoins() {
|
||||
return listeSallesDeSoins;
|
||||
}
|
||||
|
||||
public void setListeSallesDeSoins(List<SalleDeSoin> listeSallesDeSoins) {
|
||||
this.listeSallesDeSoins = listeSallesDeSoins;
|
||||
}
|
||||
|
||||
public List<TypeAlerteMedical> getListeTypesAlerte() {
|
||||
return listeTypesAlerte;
|
||||
}
|
||||
|
||||
public void setListeTypesAlerte(List<TypeAlerteMedical> listeTypesAlerte) {
|
||||
this.listeTypesAlerte = listeTypesAlerte;
|
||||
}
|
||||
|
||||
public List<Wilaya> getListeWilayas() {
|
||||
return listeWilayas;
|
||||
}
|
||||
|
||||
public void setListeWilayas(List<Wilaya> listeWilayas) {
|
||||
this.listeWilayas = listeWilayas;
|
||||
}
|
||||
|
||||
public List<Machine> getListeMachines() {
|
||||
return listeMachines;
|
||||
}
|
||||
|
||||
public void setListeMachines(List<Machine> listeMachines) {
|
||||
this.listeMachines = listeMachines;
|
||||
}
|
||||
|
||||
public SpecialiteMedicale getSpecialiteSelected() {
|
||||
return specialiteSelected;
|
||||
}
|
||||
|
||||
public void setSpecialiteSelected(SpecialiteMedicale specialiteSelected) {
|
||||
this.specialiteSelected = specialiteSelected;
|
||||
}
|
||||
|
||||
public TypeExamen getTypeExamenSelected() {
|
||||
return typeExamenSelected;
|
||||
}
|
||||
|
||||
public void setTypeExamenSelected(TypeExamen typeExamenSelected) {
|
||||
this.typeExamenSelected = typeExamenSelected;
|
||||
}
|
||||
|
||||
public Priority getPrioriteSelected() {
|
||||
return prioriteSelected;
|
||||
}
|
||||
|
||||
public void setPrioriteSelected(Priority prioriteSelected) {
|
||||
this.prioriteSelected = prioriteSelected;
|
||||
}
|
||||
|
||||
public QueueTips getIndicationSelected() {
|
||||
return indicationSelected;
|
||||
}
|
||||
|
||||
public void setIndicationSelected(QueueTips indicationSelected) {
|
||||
this.indicationSelected = indicationSelected;
|
||||
}
|
||||
|
||||
public TypeMachine getTypeMachineSelected() {
|
||||
return typeMachineSelected;
|
||||
}
|
||||
|
||||
public void setTypeMachineSelected(TypeMachine typeMachineSelected) {
|
||||
this.typeMachineSelected = typeMachineSelected;
|
||||
}
|
||||
|
||||
public SalleDeSoin getSalleSelected() {
|
||||
return salleSelected;
|
||||
}
|
||||
|
||||
public void setSalleSelected(SalleDeSoin salleSelected) {
|
||||
this.salleSelected = salleSelected;
|
||||
}
|
||||
|
||||
public TypeAlerteMedical getTypeAlerteSelected() {
|
||||
return typeAlerteSelected;
|
||||
}
|
||||
|
||||
public void setTypeAlerteSelected(TypeAlerteMedical typeAlerteSelected) {
|
||||
this.typeAlerteSelected = typeAlerteSelected;
|
||||
}
|
||||
|
||||
public void resetSelections() {
|
||||
specialiteSelected = new SpecialiteMedicale();
|
||||
typeExamenSelected = new TypeExamen();
|
||||
prioriteSelected = new Priority();
|
||||
indicationSelected = new QueueTips();
|
||||
typeMachineSelected = new TypeMachine();
|
||||
salleSelected = new SalleDeSoin();
|
||||
typeAlerteSelected = new TypeAlerteMedical();
|
||||
}
|
||||
|
||||
public List<Machine> getSelectedMachines() {
|
||||
return selectedMachines;
|
||||
}
|
||||
|
||||
public void setSelectedMachines(List<Machine> selectedMachines) {
|
||||
this.selectedMachines = selectedMachines;
|
||||
}
|
||||
|
||||
public List<TypeExamen> getSelectedTypeExamen() {
|
||||
if (selectedTypeExamen == null) {
|
||||
selectedTypeExamen = new ArrayList<>();
|
||||
}
|
||||
return selectedTypeExamen;
|
||||
}
|
||||
|
||||
public void setSelectedTypeExamen(List<TypeExamen> selectedTypeExamen) {
|
||||
this.selectedTypeExamen = selectedTypeExamen;
|
||||
}
|
||||
|
||||
public int gtNbMachineInSalleDeSoins(SalleDeSoin salle) {
|
||||
List<Machine> machines = service.getMachineBySalle(salle);
|
||||
return machines.size();
|
||||
}
|
||||
|
||||
public int gtTypeExamenByTypAlerte(TypeAlerteMedical salle) {
|
||||
List<TypeExamen> examns = service.getTypeExamenByTypeAlerte(salle);
|
||||
return examns.size();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.bean.converter;
|
||||
|
||||
import com.triz.trizservice.modeles.TypeExamen;
|
||||
import com.triz.trizservice.service.TransactionService;
|
||||
import java.util.UUID;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.convert.FacesConverter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@FacesConverter("typeExamenConverter")
|
||||
@Component
|
||||
public class TypeExamenConverter implements Converter {
|
||||
|
||||
@Autowired
|
||||
protected transient TransactionService service;
|
||||
|
||||
@Override
|
||||
public Object getAsObject(FacesContext fc, UIComponent uic, String value) {
|
||||
try {
|
||||
return service.findById(TypeExamen.class, UUID.fromString(value));
|
||||
} catch (NumberFormatException e) {
|
||||
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "TypeExamen n'existe pas.");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAsString(FacesContext fc, UIComponent uic, Object object) {
|
||||
if (object != null) {
|
||||
return String.valueOf(((TypeExamen) object).getId());
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.bean.converter;
|
||||
|
||||
import com.triz.trizservice.modeles.Wilaya;
|
||||
import com.triz.trizservice.service.TransactionService;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.convert.FacesConverter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@FacesConverter("wilayaConverter")
|
||||
@Component
|
||||
public class WilayaConverter implements Converter {
|
||||
|
||||
@Autowired
|
||||
protected transient TransactionService service;
|
||||
|
||||
@Override
|
||||
public Object getAsObject(FacesContext fc, UIComponent uic, String value) {
|
||||
try {
|
||||
return service.findById(Wilaya.class, value);
|
||||
} catch (NumberFormatException e) {
|
||||
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "Wilaya n'existe pas.");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAsString(FacesContext fc, UIComponent uic, Object object) {
|
||||
if (object != null) {
|
||||
return String.valueOf(((Wilaya) object).getName());
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -38,11 +38,6 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "Centre.findByLongitude", query = "SELECT c FROM Centre c WHERE c.longitude = :longitude")})
|
||||
public class Centre implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@NotNull
|
||||
@Column(name = "id")
|
||||
private UUID id;
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Size(min = 1, max = 2147483647)
|
||||
@ -51,6 +46,19 @@ public class Centre implements Serializable {
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "adresse")
|
||||
private String adresse;
|
||||
@Size(max = 5)
|
||||
@Column(name = "actif")
|
||||
private String actif;
|
||||
@OneToMany(mappedBy = "fkCentre")
|
||||
private List<WeekEnd> weekEndList;
|
||||
@OneToMany(mappedBy = "fkCentre")
|
||||
private List<JoursFerier> joursFerierList;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@NotNull
|
||||
@Column(name = "id")
|
||||
private UUID id;
|
||||
// @Max(value=?) @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
|
||||
@Column(name = "latitude")
|
||||
private Double latitude;
|
||||
@ -75,11 +83,6 @@ public class Centre implements Serializable {
|
||||
private List<Machine> machineList;
|
||||
@OneToMany(mappedBy = "fkCentre")
|
||||
private List<SalleDeSoin> salleDeSoinList;
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Size(min = 1, max = 5)
|
||||
@Column(name = "actif")
|
||||
private String actif;
|
||||
|
||||
public Centre() {
|
||||
}
|
||||
@ -101,21 +104,6 @@ public class Centre implements Serializable {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getAdresse() {
|
||||
return adresse;
|
||||
}
|
||||
|
||||
public void setAdresse(String adresse) {
|
||||
this.adresse = adresse;
|
||||
}
|
||||
|
||||
public Double getLatitude() {
|
||||
return latitude;
|
||||
@ -238,6 +226,22 @@ public class Centre implements Serializable {
|
||||
return "com.triz.trizservice.modeles.Centre[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getAdresse() {
|
||||
return adresse;
|
||||
}
|
||||
|
||||
public void setAdresse(String adresse) {
|
||||
this.adresse = adresse;
|
||||
}
|
||||
|
||||
public String getActif() {
|
||||
return actif;
|
||||
}
|
||||
@ -246,4 +250,22 @@ public class Centre implements Serializable {
|
||||
this.actif = actif;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<WeekEnd> getWeekEndList() {
|
||||
return weekEndList;
|
||||
}
|
||||
|
||||
public void setWeekEndList(List<WeekEnd> weekEndList) {
|
||||
this.weekEndList = weekEndList;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<JoursFerier> getJoursFerierList() {
|
||||
return joursFerierList;
|
||||
}
|
||||
|
||||
public void setJoursFerierList(List<JoursFerier> joursFerierList) {
|
||||
this.joursFerierList = joursFerierList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,7 +6,9 @@ package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
@ -15,12 +17,14 @@ import javax.persistence.Lob;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -40,6 +44,21 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||
@NamedQuery(name = "Consultation.findByHeureFin", query = "SELECT c FROM Consultation c WHERE c.heureFin = :heureFin")})
|
||||
public class Consultation implements Serializable {
|
||||
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "rapport_ecrit")
|
||||
private String rapportEcrit;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "file_path_rapport_dictee")
|
||||
private String filePathRapportDictee;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "file_path_signature")
|
||||
private String filePathSignature;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "fkConsultation")
|
||||
private List<Filepathrapportdictee> filepathrapportdicteeList;
|
||||
@JoinColumn(name = "fk_ecritpar", referencedColumnName = "userid")
|
||||
@ManyToOne
|
||||
private ServiceUser fkEcritpar;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@ -47,17 +66,8 @@ public class Consultation implements Serializable {
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "rapport_ecrit")
|
||||
private String rapportEcrit;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "file_path_rapport_dictee")
|
||||
private String filePathRapportDictee;
|
||||
@Column(name = "session_annule")
|
||||
private Boolean sessionAnnule;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "file_path_signature")
|
||||
private String filePathSignature;
|
||||
@Column(name = "date")
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date date;
|
||||
@ -197,4 +207,22 @@ public class Consultation implements Serializable {
|
||||
this.fkPatient = fkPatient;
|
||||
}
|
||||
|
||||
|
||||
@XmlTransient
|
||||
public List<Filepathrapportdictee> getFilepathrapportdicteeList() {
|
||||
return filepathrapportdicteeList;
|
||||
}
|
||||
|
||||
public void setFilepathrapportdicteeList(List<Filepathrapportdictee> filepathrapportdicteeList) {
|
||||
this.filepathrapportdicteeList = filepathrapportdicteeList;
|
||||
}
|
||||
|
||||
public ServiceUser getFkEcritpar() {
|
||||
return fkEcritpar;
|
||||
}
|
||||
|
||||
public void setFkEcritpar(ServiceUser fkEcritpar) {
|
||||
this.fkEcritpar = fkEcritpar;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -45,27 +45,9 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "Examen.findByStudyInstanceUid", query = "SELECT e FROM Examen e WHERE e.studyInstanceUid = :studyInstanceUid")})
|
||||
public class Examen implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "url_acc_num")
|
||||
private String urlAccNum;
|
||||
@Column(name = "annule")
|
||||
private Boolean annule;
|
||||
@Column(name = "date")
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date date;
|
||||
@Column(name = "heure_debut")
|
||||
@Temporal(TemporalType.TIME)
|
||||
private Date heureDebut;
|
||||
@Column(name = "heure_fin")
|
||||
@Temporal(TemporalType.TIME)
|
||||
private Date heureFin;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "region_examinee")
|
||||
private String regionExaminee;
|
||||
@ -78,6 +60,25 @@ public class Examen implements Serializable {
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "study_instance_uid")
|
||||
private String studyInstanceUid;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Column(name = "annule")
|
||||
private Boolean annule;
|
||||
@Column(name = "date")
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date date;
|
||||
@Column(name = "heure_debut")
|
||||
@Temporal(TemporalType.TIME)
|
||||
private Date heureDebut;
|
||||
@Column(name = "heure_fin")
|
||||
@Temporal(TemporalType.TIME)
|
||||
private Date heureFin;
|
||||
@OneToMany(mappedBy = "fkExamen")
|
||||
private List<ImageCles> imageClesList;
|
||||
@OneToMany(mappedBy = "fkExamen")
|
||||
@ -151,13 +152,6 @@ public class Examen implements Serializable {
|
||||
this.regionExaminee = regionExaminee;
|
||||
}
|
||||
|
||||
public String getLateralite() {
|
||||
return lateralite;
|
||||
}
|
||||
|
||||
public void setLateralite(String lateralite) {
|
||||
this.lateralite = lateralite;
|
||||
}
|
||||
|
||||
public String getIndicationClinique() {
|
||||
return indicationClinique;
|
||||
@ -234,5 +228,5 @@ public class Examen implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.Examen[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "filepathrapportdictee")
|
||||
@XmlRootElement
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "Filepathrapportdictee.findAll", query = "SELECT f FROM Filepathrapportdictee f"),
|
||||
@NamedQuery(name = "Filepathrapportdictee.findByDate", query = "SELECT f FROM Filepathrapportdictee f WHERE f.date = :date"),
|
||||
@NamedQuery(name = "Filepathrapportdictee.findByHeure", query = "SELECT f FROM Filepathrapportdictee f WHERE f.heure = :heure"),
|
||||
@NamedQuery(name = "Filepathrapportdictee.findByFilepath", query = "SELECT f FROM Filepathrapportdictee f WHERE f.filepath = :filepath")})
|
||||
public class Filepathrapportdictee implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Column(name = "date")
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date date;
|
||||
@Column(name = "heure")
|
||||
@Temporal(TemporalType.TIME)
|
||||
private Date heure;
|
||||
@Size(max = 1000)
|
||||
@Column(name = "filepath")
|
||||
private String filepath;
|
||||
@JoinColumn(name = "fk_consultation", referencedColumnName = "id")
|
||||
@ManyToOne(optional = false)
|
||||
private Consultation fkConsultation;
|
||||
|
||||
public Filepathrapportdictee() {
|
||||
}
|
||||
|
||||
public Filepathrapportdictee(Object id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public Date getHeure() {
|
||||
return heure;
|
||||
}
|
||||
|
||||
public void setHeure(Date heure) {
|
||||
this.heure = heure;
|
||||
}
|
||||
|
||||
public String getFilepath() {
|
||||
return filepath;
|
||||
}
|
||||
|
||||
public void setFilepath(String filepath) {
|
||||
this.filepath = filepath;
|
||||
}
|
||||
|
||||
public Consultation getFkConsultation() {
|
||||
return fkConsultation;
|
||||
}
|
||||
|
||||
public void setFkConsultation(Consultation fkConsultation) {
|
||||
this.fkConsultation = fkConsultation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof Filepathrapportdictee)) {
|
||||
return false;
|
||||
}
|
||||
Filepathrapportdictee other = (Filepathrapportdictee) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.Filepathrapportdictee[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
}
|
||||
144
src/main/java/com/triz/trizservice/modeles/JoursFerier.java
Normal file
144
src/main/java/com/triz/trizservice/modeles/JoursFerier.java
Normal file
@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "jours_ferier")
|
||||
@XmlRootElement
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "JoursFerier.findAll", query = "SELECT j FROM JoursFerier j"),
|
||||
@NamedQuery(name = "JoursFerier.findByTitre", query = "SELECT j FROM JoursFerier j WHERE j.titre = :titre"),
|
||||
@NamedQuery(name = "JoursFerier.findByIsrepetedyearly", query = "SELECT j FROM JoursFerier j WHERE j.isrepetedyearly = :isrepetedyearly"),
|
||||
@NamedQuery(name = "JoursFerier.findByCategory", query = "SELECT j FROM JoursFerier j WHERE j.category = :category"),
|
||||
@NamedQuery(name = "JoursFerier.findByCreatedAt", query = "SELECT j FROM JoursFerier j WHERE j.createdAt = :createdAt")})
|
||||
public class JoursFerier implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private UUID id;
|
||||
@Size(max = 255)
|
||||
@Column(name = "titre")
|
||||
private String titre;
|
||||
@Column(name = "isrepetedyearly")
|
||||
private Boolean isrepetedyearly;
|
||||
@Size(max = 100)
|
||||
@Column(name = "category")
|
||||
private String category;
|
||||
@Column(name = "created_at")
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date createdAt;
|
||||
@JoinColumn(name = "fk_centre", referencedColumnName = "id")
|
||||
@ManyToOne
|
||||
private Centre fkCentre;
|
||||
|
||||
public JoursFerier() {
|
||||
}
|
||||
|
||||
public JoursFerier(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitre() {
|
||||
return titre;
|
||||
}
|
||||
|
||||
public void setTitre(String titre) {
|
||||
this.titre = titre;
|
||||
}
|
||||
|
||||
public Boolean getIsrepetedyearly() {
|
||||
return isrepetedyearly;
|
||||
}
|
||||
|
||||
public void setIsrepetedyearly(Boolean isrepetedyearly) {
|
||||
this.isrepetedyearly = isrepetedyearly;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public Date getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Date createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Centre getFkCentre() {
|
||||
return fkCentre;
|
||||
}
|
||||
|
||||
public void setFkCentre(Centre fkCentre) {
|
||||
this.fkCentre = fkCentre;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof JoursFerier)) {
|
||||
return false;
|
||||
}
|
||||
JoursFerier other = (JoursFerier) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.JoursFerier[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -6,9 +6,11 @@ package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
@ -40,13 +42,17 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "Machine.findByAeTitle", query = "SELECT m FROM Machine m WHERE m.aeTitle = :aeTitle")})
|
||||
public class Machine implements Serializable {
|
||||
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "ip")
|
||||
private String ip;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
private UUID id;
|
||||
@Column(name = "nb_rdv_max")
|
||||
private Integer nbRdvMax;
|
||||
@Column(name = "nb_patient_max")
|
||||
@ -55,9 +61,6 @@ public class Machine implements Serializable {
|
||||
private Boolean actif;
|
||||
@Column(name = "disponible")
|
||||
private Boolean disponible;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "ip")
|
||||
private String ip;
|
||||
@Column(name = "port")
|
||||
private Integer port;
|
||||
@Column(name = "ae_title")
|
||||
@ -70,19 +73,23 @@ public class Machine implements Serializable {
|
||||
@JoinColumn(name = "fk_type_machine", referencedColumnName = "id")
|
||||
@ManyToOne
|
||||
private TypeMachine fkTypeMachine;
|
||||
|
||||
@JoinColumn(name = "fk_salle", referencedColumnName = "id")
|
||||
@ManyToOne
|
||||
private SalleDeSoin fkSalle;
|
||||
|
||||
public Machine() {
|
||||
}
|
||||
|
||||
public Machine(Object id) {
|
||||
public Machine(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ -118,13 +125,6 @@ public class Machine implements Serializable {
|
||||
this.disponible = disponible;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public Integer getPort() {
|
||||
return port;
|
||||
@ -191,5 +191,21 @@ public class Machine implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.Machine[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public SalleDeSoin getFkSalle() {
|
||||
return fkSalle;
|
||||
}
|
||||
|
||||
public void setFkSalle(SalleDeSoin fkSalle) {
|
||||
this.fkSalle = fkSalle;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -39,6 +39,10 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "Medecin.findBySexe", query = "SELECT m FROM Medecin m WHERE m.sexe = :sexe")})
|
||||
public class Medecin implements Serializable {
|
||||
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "sexe")
|
||||
private String sexe;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@ -52,9 +56,6 @@ public class Medecin implements Serializable {
|
||||
private Integer nbPatientMax;
|
||||
@Column(name = "disponible")
|
||||
private Boolean disponible;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "sexe")
|
||||
private String sexe;
|
||||
@JoinColumn(name = "fk_centre", referencedColumnName = "id")
|
||||
@ManyToOne
|
||||
private Centre fkCentre;
|
||||
@ -105,13 +106,6 @@ public class Medecin implements Serializable {
|
||||
this.disponible = disponible;
|
||||
}
|
||||
|
||||
public String getSexe() {
|
||||
return sexe;
|
||||
}
|
||||
|
||||
public void setSexe(String sexe) {
|
||||
this.sexe = sexe;
|
||||
}
|
||||
|
||||
public Centre getFkCentre() {
|
||||
return fkCentre;
|
||||
@ -171,5 +165,13 @@ public class Medecin implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.Medecin[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public String getSexe() {
|
||||
return sexe;
|
||||
}
|
||||
|
||||
public void setSexe(String sexe) {
|
||||
this.sexe = sexe;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,9 +5,11 @@
|
||||
package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
@ -36,9 +38,9 @@ public class Parametre implements Serializable {
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
private UUID id;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "mwl_scp_aet")
|
||||
private String mwlScpAet;
|
||||
@ -52,15 +54,15 @@ public class Parametre implements Serializable {
|
||||
public Parametre() {
|
||||
}
|
||||
|
||||
public Parametre(Object id) {
|
||||
public Parametre(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@ -7,9 +7,11 @@ package com.triz.trizservice.modeles;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
@ -47,22 +49,12 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "Patient.findByCreeLe", query = "SELECT p FROM Patient p WHERE p.creeLe = :creeLe")})
|
||||
public class Patient implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "nom")
|
||||
private String nom;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "prenom")
|
||||
private String prenom;
|
||||
@Column(name = "date_naissance")
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date dateNaissance;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "telephone")
|
||||
private String telephone;
|
||||
@ -71,7 +63,7 @@ public class Patient implements Serializable {
|
||||
private String telephoneRelative;
|
||||
// @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "email")
|
||||
@Column(name="email")
|
||||
private String email;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "sexe")
|
||||
@ -79,12 +71,25 @@ public class Patient implements Serializable {
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "nin")
|
||||
private String nin;
|
||||
// @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "adresse")
|
||||
private String adresse;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "groupage")
|
||||
private String groupage;
|
||||
@OneToMany(mappedBy = "fkPatient")
|
||||
private List<Consultation> consultationList;
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private UUID id;
|
||||
@Column(name = "date_naissance")
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date dateNaissance;
|
||||
@Column(name = "cree_le")
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date creeLe;
|
||||
@ -105,33 +110,18 @@ public class Patient implements Serializable {
|
||||
public Patient() {
|
||||
}
|
||||
|
||||
public Patient(Object id) {
|
||||
public Patient(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
public String getPrenom() {
|
||||
return prenom;
|
||||
}
|
||||
|
||||
public void setPrenom(String prenom) {
|
||||
this.prenom = prenom;
|
||||
}
|
||||
|
||||
public Date getDateNaissance() {
|
||||
return dateNaissance;
|
||||
@ -141,13 +131,6 @@ public class Patient implements Serializable {
|
||||
this.dateNaissance = dateNaissance;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getTelephoneRelative() {
|
||||
return telephoneRelative;
|
||||
@ -157,45 +140,6 @@ public class Patient implements Serializable {
|
||||
this.telephoneRelative = telephoneRelative;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getSexe() {
|
||||
return sexe;
|
||||
}
|
||||
|
||||
public void setSexe(String sexe) {
|
||||
this.sexe = sexe;
|
||||
}
|
||||
|
||||
public String getNin() {
|
||||
return nin;
|
||||
}
|
||||
|
||||
public void setNin(String nin) {
|
||||
this.nin = nin;
|
||||
}
|
||||
|
||||
public String getAdresse() {
|
||||
return adresse;
|
||||
}
|
||||
|
||||
public void setAdresse(String adresse) {
|
||||
this.adresse = adresse;
|
||||
}
|
||||
|
||||
public String getGroupage() {
|
||||
return groupage;
|
||||
}
|
||||
|
||||
public void setGroupage(String groupage) {
|
||||
this.groupage = groupage;
|
||||
}
|
||||
|
||||
public Date getCreeLe() {
|
||||
return creeLe;
|
||||
@ -282,5 +226,79 @@ public class Patient implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.Patient[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
public String getPrenom() {
|
||||
return prenom;
|
||||
}
|
||||
|
||||
public void setPrenom(String prenom) {
|
||||
this.prenom = prenom;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getSexe() {
|
||||
return sexe;
|
||||
}
|
||||
|
||||
public void setSexe(String sexe) {
|
||||
this.sexe = sexe;
|
||||
}
|
||||
|
||||
public String getNin() {
|
||||
return nin;
|
||||
}
|
||||
|
||||
public void setNin(String nin) {
|
||||
this.nin = nin;
|
||||
}
|
||||
|
||||
public String getAdresse() {
|
||||
return adresse;
|
||||
}
|
||||
|
||||
public void setAdresse(String adresse) {
|
||||
this.adresse = adresse;
|
||||
}
|
||||
|
||||
public String getGroupage() {
|
||||
return groupage;
|
||||
}
|
||||
|
||||
public void setGroupage(String groupage) {
|
||||
this.groupage = groupage;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<Consultation> getConsultationList() {
|
||||
return consultationList;
|
||||
}
|
||||
|
||||
public void setConsultationList(List<Consultation> consultationList) {
|
||||
this.consultationList = consultationList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,9 +6,11 @@ package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.NamedQueries;
|
||||
@ -33,18 +35,19 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "Priority.findByPoids", query = "SELECT p FROM Priority p WHERE p.poids = :poids")})
|
||||
public class Priority implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Size(min = 1, max = 2147483647)
|
||||
@Column(name = "designation")
|
||||
private String designation;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private UUID id;
|
||||
@Column(name = "poids")
|
||||
private Integer poids;
|
||||
@OneToMany(mappedBy = "fkPriority")
|
||||
@ -53,30 +56,23 @@ public class Priority implements Serializable {
|
||||
public Priority() {
|
||||
}
|
||||
|
||||
public Priority(Object id) {
|
||||
public Priority(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Priority(Object id, String designation) {
|
||||
public Priority(UUID id, String designation) {
|
||||
this.id = id;
|
||||
this.designation = designation;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDesignation() {
|
||||
return designation;
|
||||
}
|
||||
|
||||
public void setDesignation(String designation) {
|
||||
this.designation = designation;
|
||||
}
|
||||
|
||||
public Integer getPoids() {
|
||||
return poids;
|
||||
@ -119,5 +115,13 @@ public class Priority implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.Priority[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public String getDesignation() {
|
||||
return designation;
|
||||
}
|
||||
|
||||
public void setDesignation(String designation) {
|
||||
this.designation = designation;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -40,6 +40,13 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "Queue.findByCreatedAt", query = "SELECT q FROM Queue q WHERE q.createdAt = :createdAt")})
|
||||
public class Queue implements Serializable {
|
||||
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "ticket")
|
||||
private String ticket;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "status")
|
||||
private String status;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@ -47,12 +54,6 @@ public class Queue implements Serializable {
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "ticket")
|
||||
private String ticket;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "status")
|
||||
private String status;
|
||||
@Column(name = "date")
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date date;
|
||||
@ -91,21 +92,6 @@ public class Queue implements Serializable {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTicket() {
|
||||
return ticket;
|
||||
}
|
||||
|
||||
public void setTicket(String ticket) {
|
||||
this.ticket = ticket;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return date;
|
||||
@ -197,5 +183,21 @@ public class Queue implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.Queue[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public String getTicket() {
|
||||
return ticket;
|
||||
}
|
||||
|
||||
public void setTicket(String ticket) {
|
||||
this.ticket = ticket;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,9 +6,11 @@ package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.NamedQueries;
|
||||
@ -33,18 +35,19 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "QueueTips.findByOrdre", query = "SELECT q FROM QueueTips q WHERE q.ordre = :ordre")})
|
||||
public class QueueTips implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Size(min = 1, max = 2147483647)
|
||||
@Column(name = "designation")
|
||||
private String designation;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private UUID id;
|
||||
@Column(name = "ordre")
|
||||
private Integer ordre;
|
||||
@OneToMany(mappedBy = "fkQueueTips")
|
||||
@ -53,30 +56,23 @@ public class QueueTips implements Serializable {
|
||||
public QueueTips() {
|
||||
}
|
||||
|
||||
public QueueTips(Object id) {
|
||||
public QueueTips(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public QueueTips(Object id, String designation) {
|
||||
public QueueTips(UUID id, String designation) {
|
||||
this.id = id;
|
||||
this.designation = designation;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDesignation() {
|
||||
return designation;
|
||||
}
|
||||
|
||||
public void setDesignation(String designation) {
|
||||
this.designation = designation;
|
||||
}
|
||||
|
||||
public Integer getOrdre() {
|
||||
return ordre;
|
||||
@ -119,5 +115,13 @@ public class QueueTips implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.QueueTips[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public String getDesignation() {
|
||||
return designation;
|
||||
}
|
||||
|
||||
public void setDesignation(String designation) {
|
||||
this.designation = designation;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,9 +5,11 @@
|
||||
package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
@ -35,9 +37,9 @@ public class SalleDeSoin implements Serializable {
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
private UUID id;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "code")
|
||||
private String code;
|
||||
@ -48,15 +50,15 @@ public class SalleDeSoin implements Serializable {
|
||||
public SalleDeSoin() {
|
||||
}
|
||||
|
||||
public SalleDeSoin(Object id) {
|
||||
public SalleDeSoin(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@ -100,5 +102,5 @@ public class SalleDeSoin implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.SalleDeSoin[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "ServiceUser.findAll", query = "SELECT s FROM ServiceUser s"),
|
||||
@NamedQuery(name = "ServiceUser.findByUserid", query = "SELECT s FROM ServiceUser s WHERE s.userid = :userid"),
|
||||
@NamedQuery(name = "ServiceUser.findByUserpw", query = "SELECT s FROM ServiceUser s WHERE s.userpw = :userpw"),
|
||||
@NamedQuery(name = "ServiceUser.findByUserPw", query = "SELECT s FROM ServiceUser s WHERE s.userPw = :userPw"),
|
||||
@NamedQuery(name = "ServiceUser.findByNom", query = "SELECT s FROM ServiceUser s WHERE s.nom = :nom"),
|
||||
@NamedQuery(name = "ServiceUser.findByPrenom", query = "SELECT s FROM ServiceUser s WHERE s.prenom = :prenom"),
|
||||
@NamedQuery(name = "ServiceUser.findByTelephone", query = "SELECT s FROM ServiceUser s WHERE s.telephone = :telephone"),
|
||||
@ -40,10 +40,15 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
public class ServiceUser implements Serializable {
|
||||
|
||||
|
||||
@Basic(optional = false)
|
||||
@NotNull()
|
||||
@Size(min = 1, max = 50)
|
||||
@Column(name = "user_pw")
|
||||
private String userPw;
|
||||
|
||||
@Size(max = 50)
|
||||
@Column(name = "nom")
|
||||
private String nom;
|
||||
|
||||
@Size(max = 50)
|
||||
@Column(name = "prenom")
|
||||
private String prenom;
|
||||
@ -56,15 +61,14 @@ public class ServiceUser implements Serializable {
|
||||
@Size(max = 5)
|
||||
@Column(name = "actif")
|
||||
private String actif;
|
||||
@OneToMany(mappedBy = "fkEcritpar")
|
||||
private List<Consultation> consultationList;
|
||||
@OneToMany(mappedBy = "fkUser")
|
||||
private List<ServiceUserCentre> serviceUserCentreList;
|
||||
@OneToMany(mappedBy = "fkUser")
|
||||
private List<NotifieMedecin> notifieMedecinList;
|
||||
@OneToMany(mappedBy = "fkUser")
|
||||
private List<Medecin> medecinList;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "user_pw")
|
||||
private String userpw;
|
||||
@OneToMany(mappedBy = "fkUser")
|
||||
private List<ServiceHistoriqueManipulation> serviceHistoriqueManipulationList;
|
||||
|
||||
@ -149,17 +153,46 @@ public class ServiceUser implements Serializable {
|
||||
this.serviceHistoriqueManipulationList = serviceHistoriqueManipulationList;
|
||||
}
|
||||
|
||||
public String getUserpw() {
|
||||
return userpw;
|
||||
}
|
||||
|
||||
public void setUserpw(String userpw) {
|
||||
this.userpw = userpw;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@XmlTransient
|
||||
public List<ServiceUserCentre> getServiceUserCentreList() {
|
||||
return serviceUserCentreList;
|
||||
}
|
||||
|
||||
public void setServiceUserCentreList(List<ServiceUserCentre> serviceUserCentreList) {
|
||||
this.serviceUserCentreList = serviceUserCentreList;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<NotifieMedecin> getNotifieMedecinList() {
|
||||
return notifieMedecinList;
|
||||
}
|
||||
|
||||
public void setNotifieMedecinList(List<NotifieMedecin> notifieMedecinList) {
|
||||
this.notifieMedecinList = notifieMedecinList;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<Medecin> getMedecinList() {
|
||||
return medecinList;
|
||||
}
|
||||
|
||||
public void setMedecinList(List<Medecin> medecinList) {
|
||||
this.medecinList = medecinList;
|
||||
}
|
||||
|
||||
public String getUserPw() {
|
||||
return userPw;
|
||||
}
|
||||
|
||||
public void setUserPw(String userPw) {
|
||||
this.userPw = userPw;
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
@ -201,30 +234,12 @@ public class ServiceUser implements Serializable {
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<ServiceUserCentre> getServiceUserCentreList() {
|
||||
return serviceUserCentreList;
|
||||
public List<Consultation> getConsultationList() {
|
||||
return consultationList;
|
||||
}
|
||||
|
||||
public void setServiceUserCentreList(List<ServiceUserCentre> serviceUserCentreList) {
|
||||
this.serviceUserCentreList = serviceUserCentreList;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<NotifieMedecin> getNotifieMedecinList() {
|
||||
return notifieMedecinList;
|
||||
}
|
||||
|
||||
public void setNotifieMedecinList(List<NotifieMedecin> notifieMedecinList) {
|
||||
this.notifieMedecinList = notifieMedecinList;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<Medecin> getMedecinList() {
|
||||
return medecinList;
|
||||
}
|
||||
|
||||
public void setMedecinList(List<Medecin> medecinList) {
|
||||
this.medecinList = medecinList;
|
||||
public void setConsultationList(List<Consultation> consultationList) {
|
||||
this.consultationList = consultationList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,57 +1,74 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.persistence.Basic;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "specialite_medicale")
|
||||
@XmlRootElement
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "SpecialiteMedicale.findAll", query = "SELECT s FROM SpecialiteMedicale s"),
|
||||
@NamedQuery(name = "SpecialiteMedicale.findByName", query = "SELECT s FROM SpecialiteMedicale s WHERE s.name = :name"),
|
||||
@NamedQuery(name = "SpecialiteMedicale.findByDescription", query = "SELECT s FROM SpecialiteMedicale s WHERE s.description = :description")})
|
||||
@NamedQuery(name = "SpecialiteMedicale.findAll",
|
||||
query = "SELECT s FROM SpecialiteMedicale s"),
|
||||
@NamedQuery(name = "SpecialiteMedicale.findById",
|
||||
query = "SELECT s FROM SpecialiteMedicale s WHERE s.id = :id"),
|
||||
@NamedQuery(name = "SpecialiteMedicale.findByName",
|
||||
query = "SELECT s FROM SpecialiteMedicale s WHERE s.name = :name"),
|
||||
@NamedQuery(name = "SpecialiteMedicale.findByDescription",
|
||||
query = "SELECT s FROM SpecialiteMedicale s WHERE s.description = :description")
|
||||
})
|
||||
public class SpecialiteMedicale implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Size(min = 1, max = 2147483647)
|
||||
@Column(name = "name")
|
||||
@GeneratedValue
|
||||
@Column(name = "id", nullable = false)
|
||||
private UUID id;
|
||||
|
||||
@Size(max = 255)
|
||||
@Column(name = "name", nullable = false, unique = true)
|
||||
private String name;
|
||||
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
|
||||
@OneToMany(mappedBy = "fkSpecialite")
|
||||
private List<MedecinSpecialiste> medecinSpecialisteList;
|
||||
|
||||
public SpecialiteMedicale() {
|
||||
this.id = UUID.randomUUID();
|
||||
}
|
||||
|
||||
public SpecialiteMedicale(String name) {
|
||||
public SpecialiteMedicale(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public SpecialiteMedicale(UUID id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@ -79,27 +96,20 @@ public class SpecialiteMedicale implements Serializable {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (name != null ? name.hashCode() : 0);
|
||||
return hash;
|
||||
return id != null ? id.hashCode() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof SpecialiteMedicale)) {
|
||||
return false;
|
||||
}
|
||||
SpecialiteMedicale other = (SpecialiteMedicale) object;
|
||||
if ((this.name == null && other.name != null) || (this.name != null && !this.name.equals(other.name))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return id != null && id.equals(other.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.SpecialiteMedicale[ name=" + name + " ]";
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -6,9 +6,11 @@ package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.NamedQueries;
|
||||
@ -36,9 +38,9 @@ public class TypeAlerteMedical implements Serializable {
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
private UUID id;
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Size(min = 1, max = 2147483647)
|
||||
@ -50,20 +52,20 @@ public class TypeAlerteMedical implements Serializable {
|
||||
public TypeAlerteMedical() {
|
||||
}
|
||||
|
||||
public TypeAlerteMedical(Object id) {
|
||||
public TypeAlerteMedical(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public TypeAlerteMedical(Object id, String type) {
|
||||
public TypeAlerteMedical(UUID id, String type) {
|
||||
this.id = id;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@ -7,9 +7,13 @@ package com.triz.trizservice.modeles;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
@ -39,18 +43,22 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "TypeExamen.findByTempsEstime", query = "SELECT t FROM TypeExamen t WHERE t.tempsEstime = :tempsEstime")})
|
||||
public class TypeExamen implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Size(min = 1, max = 2147483647)
|
||||
@Column(name = "nom")
|
||||
private String nom;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "fkExamen")
|
||||
private List<TypealerteTypeexamen> typealerteTypeexamenList;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private UUID id;
|
||||
@Column(name = "poids")
|
||||
private Integer poids;
|
||||
@Column(name = "temps_estime")
|
||||
@ -62,37 +70,27 @@ public class TypeExamen implements Serializable {
|
||||
@JoinColumn(name = "fk_patient", referencedColumnName = "id")
|
||||
@ManyToOne
|
||||
private Patient fkPatient;
|
||||
@OneToMany(mappedBy = "fkTypeExamen")
|
||||
private List<Queue> queueList;
|
||||
|
||||
public TypeExamen() {
|
||||
}
|
||||
|
||||
public TypeExamen(Object id) {
|
||||
public TypeExamen(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public TypeExamen(Object id, String nom) {
|
||||
public TypeExamen(UUID id, String nom) {
|
||||
this.id = id;
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
public Integer getPoids() {
|
||||
return poids;
|
||||
}
|
||||
@ -125,14 +123,7 @@ public class TypeExamen implements Serializable {
|
||||
this.fkPatient = fkPatient;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<Queue> getQueueList() {
|
||||
return queueList;
|
||||
}
|
||||
|
||||
public void setQueueList(List<Queue> queueList) {
|
||||
this.queueList = queueList;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
@ -158,5 +149,23 @@ public class TypeExamen implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.TypeExamen[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
|
||||
@XmlTransient
|
||||
public List<TypealerteTypeexamen> getTypealerteTypeexamenList() {
|
||||
return typealerteTypeexamenList;
|
||||
}
|
||||
|
||||
public void setTypealerteTypeexamenList(List<TypealerteTypeexamen> typealerteTypeexamenList) {
|
||||
this.typealerteTypeexamenList = typealerteTypeexamenList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,9 +6,11 @@ package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.NamedQueries;
|
||||
@ -33,52 +35,38 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "TypeMachine.findByCode", query = "SELECT t FROM TypeMachine t WHERE t.code = :code")})
|
||||
public class TypeMachine implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "type")
|
||||
private String type;
|
||||
@Size(max = 2147483647)
|
||||
@Column(name = "code")
|
||||
private String code;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private UUID id;
|
||||
@OneToMany(mappedBy = "fkTypeMachine")
|
||||
private List<Machine> machineList;
|
||||
|
||||
public TypeMachine() {
|
||||
}
|
||||
|
||||
public TypeMachine(Object id) {
|
||||
public TypeMachine(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<Machine> getMachineList() {
|
||||
@ -113,5 +101,21 @@ public class TypeMachine implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.TypeMachine[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.Table;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "typealerte_typeexamen")
|
||||
@XmlRootElement
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "TypealerteTypeexamen.findAll", query = "SELECT t FROM TypealerteTypeexamen t")})
|
||||
public class TypealerteTypeexamen implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private UUID id;
|
||||
@JoinColumn(name = "fk_examen", referencedColumnName = "id")
|
||||
@ManyToOne(optional = false)
|
||||
private TypeExamen fkExamen;
|
||||
@JoinColumn(name = "fk_alerte", referencedColumnName = "id")
|
||||
@ManyToOne(optional = false)
|
||||
private TypeAlerteMedical fkAlerte;
|
||||
|
||||
public TypealerteTypeexamen() {
|
||||
}
|
||||
|
||||
public TypealerteTypeexamen(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public TypeExamen getFkExamen() {
|
||||
return fkExamen;
|
||||
}
|
||||
|
||||
public void setFkExamen(TypeExamen fkExamen) {
|
||||
this.fkExamen = fkExamen;
|
||||
}
|
||||
|
||||
public TypeAlerteMedical getFkAlerte() {
|
||||
return fkAlerte;
|
||||
}
|
||||
|
||||
public void setFkAlerte(TypeAlerteMedical fkAlerte) {
|
||||
this.fkAlerte = fkAlerte;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof TypealerteTypeexamen)) {
|
||||
return false;
|
||||
}
|
||||
TypealerteTypeexamen other = (TypealerteTypeexamen) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.TypealerteTypeexamen[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
}
|
||||
137
src/main/java/com/triz/trizservice/modeles/WeekEnd.java
Normal file
137
src/main/java/com/triz/trizservice/modeles/WeekEnd.java
Normal file
@ -0,0 +1,137 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "week_end")
|
||||
@XmlRootElement
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "WeekEnd.findAll", query = "SELECT w FROM WeekEnd w"),
|
||||
@NamedQuery(name = "WeekEnd.findByDayOfWeek", query = "SELECT w FROM WeekEnd w WHERE w.dayOfWeek = :dayOfWeek"),
|
||||
@NamedQuery(name = "WeekEnd.findByDescription", query = "SELECT w FROM WeekEnd w WHERE w.description = :description"),
|
||||
@NamedQuery(name = "WeekEnd.findByCreatedAt", query = "SELECT w FROM WeekEnd w WHERE w.createdAt = :createdAt")})
|
||||
public class WeekEnd implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Column(name = "day_of_week")
|
||||
private int dayOfWeek;
|
||||
@Size(max = 255)
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
@Column(name = "created_at")
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date createdAt;
|
||||
@JoinColumn(name = "fk_centre", referencedColumnName = "id")
|
||||
@ManyToOne
|
||||
private Centre fkCentre;
|
||||
|
||||
public WeekEnd() {
|
||||
}
|
||||
|
||||
public WeekEnd(Object id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public WeekEnd(Object id, int dayOfWeek) {
|
||||
this.id = id;
|
||||
this.dayOfWeek = dayOfWeek;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getDayOfWeek() {
|
||||
return dayOfWeek;
|
||||
}
|
||||
|
||||
public void setDayOfWeek(int dayOfWeek) {
|
||||
this.dayOfWeek = dayOfWeek;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Date getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Date createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Centre getFkCentre() {
|
||||
return fkCentre;
|
||||
}
|
||||
|
||||
public void setFkCentre(Centre fkCentre) {
|
||||
this.fkCentre = fkCentre;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof WeekEnd)) {
|
||||
return false;
|
||||
}
|
||||
WeekEnd other = (WeekEnd) object;
|
||||
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.WeekEnd[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -32,6 +32,12 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||
@NamedQuery(name = "Wilaya.findByName", query = "SELECT w FROM Wilaya w WHERE w.name = :name")})
|
||||
public class Wilaya implements Serializable {
|
||||
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Size(min = 1, max = 2147483647)
|
||||
@Column(name = "name")
|
||||
private String name;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@ -39,11 +45,6 @@ public class Wilaya implements Serializable {
|
||||
@Size(min = 1, max = 2)
|
||||
@Column(name = "code")
|
||||
private String code;
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Size(min = 1, max = 2147483647)
|
||||
@Column(name = "name")
|
||||
private String name;
|
||||
@OneToMany(mappedBy = "fkWilaya")
|
||||
private List<Centre> centreList;
|
||||
|
||||
@ -67,13 +68,6 @@ public class Wilaya implements Serializable {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@XmlTransient
|
||||
public List<Centre> getCentreList() {
|
||||
@ -108,5 +102,13 @@ public class Wilaya implements Serializable {
|
||||
public String toString() {
|
||||
return "com.triz.trizservice.modeles.Wilaya[ code=" + code + " ]";
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -118,9 +118,9 @@ public class LoginServiceImpl implements AuthenticationProvider {
|
||||
}
|
||||
|
||||
private boolean login(ServiceUser user, String pw) {
|
||||
System.out.println("pw: hh " + pw);
|
||||
System.out.println("user.getPw(): " + user.getUserpw()+"hh ");
|
||||
if (user.getUserpw().equals(pw)) {
|
||||
System.out.println("pw:" + pw);
|
||||
System.out.println("user.getPw(): " + user.getUserPw()+"");
|
||||
if (user.getUserPw().equals(pw)) {
|
||||
System.out.println("true");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -7,8 +7,10 @@ package com.triz.trizservice.service;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Consultation;
|
||||
import com.triz.trizservice.modeles.Machine;
|
||||
import com.triz.trizservice.modeles.Medecin;
|
||||
import com.triz.trizservice.modeles.MedecinSpecialiste;
|
||||
import com.triz.trizservice.modeles.SalleDeSoin;
|
||||
import com.triz.trizservice.modeles.ServiceFonctiongroupe;
|
||||
import com.triz.trizservice.modeles.ServiceFonctionnaliter;
|
||||
import com.triz.trizservice.modeles.ServiceGroupe;
|
||||
@ -20,6 +22,9 @@ import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceUserCentre;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.modeles.TypeAlerteMedical;
|
||||
import com.triz.trizservice.modeles.TypeExamen;
|
||||
import com.triz.trizservice.modeles.TypealerteTypeexamen;
|
||||
import com.triz.trizservice.modeles.Wilaya;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
@ -140,5 +145,17 @@ public interface DaoService {
|
||||
public MedecinSpecialiste getMedecinSpecialisteByMedcinBySpecialiste(Medecin medecin, SpecialiteMedicale spc);
|
||||
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecin(Centre centre);
|
||||
|
||||
public <T> List<T> getAllByCentre(Class<T> clazz, Centre centre);
|
||||
|
||||
public <T> T getByCentre(Class<T> clazz, Centre centre);
|
||||
|
||||
public List<Machine> getMachineBySalle(SalleDeSoin salle);
|
||||
|
||||
public List<TypeExamen> getTypeExamenByTypeAlerte(TypeAlerteMedical type);
|
||||
|
||||
public List<MedecinSpecialiste> getMedecinSpecialisteBySpecialite(SpecialiteMedicale type);
|
||||
|
||||
public List<TypealerteTypeexamen> getTypeAlerteExamenByTypeAlerte(TypeAlerteMedical type);
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,10 @@ package com.triz.trizservice.service;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Consultation;
|
||||
import com.triz.trizservice.modeles.Machine;
|
||||
import com.triz.trizservice.modeles.Medecin;
|
||||
import com.triz.trizservice.modeles.MedecinSpecialiste;
|
||||
import com.triz.trizservice.modeles.SalleDeSoin;
|
||||
import com.triz.trizservice.modeles.ServiceFonctiongroupe;
|
||||
import com.triz.trizservice.modeles.ServiceFonctionnaliter;
|
||||
import com.triz.trizservice.modeles.ServiceGroupe;
|
||||
@ -21,6 +23,9 @@ import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceUserCentre;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.modeles.TypeAlerteMedical;
|
||||
import com.triz.trizservice.modeles.TypeExamen;
|
||||
import com.triz.trizservice.modeles.TypealerteTypeexamen;
|
||||
import com.triz.trizservice.modeles.Wilaya;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
@ -136,9 +141,21 @@ public interface TransactionService {
|
||||
|
||||
public <T extends Serializable> List<T> findAll(Class<T> clazz);
|
||||
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecinByUser(Centre centre,Medecin medecin);
|
||||
|
||||
public MedecinSpecialiste getMedecinSpecialisteByMedcinBySpecialiste(Medecin medecin,SpecialiteMedicale spc);
|
||||
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecinByUser(Centre centre, Medecin medecin);
|
||||
|
||||
public MedecinSpecialiste getMedecinSpecialisteByMedcinBySpecialiste(Medecin medecin, SpecialiteMedicale spc);
|
||||
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecin(Centre centre);
|
||||
|
||||
public <T> List<T> getAllByCentre(Class<T> clazz, Centre centre);
|
||||
|
||||
public <T> T getByCentre(Class<T> clazz, Centre centre);
|
||||
|
||||
public List<Machine> getMachineBySalle(SalleDeSoin salle);
|
||||
|
||||
public List<TypeExamen> getTypeExamenByTypeAlerte(TypeAlerteMedical type);
|
||||
|
||||
public List<MedecinSpecialiste> getMedecinSpecialisteBySpecialite(SpecialiteMedicale type);
|
||||
|
||||
public List<TypealerteTypeexamen> getTypeAlerteExamenByTypeAlerte(TypeAlerteMedical type);
|
||||
}
|
||||
|
||||
@ -7,8 +7,10 @@ package com.triz.trizservice.service.impl;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Consultation;
|
||||
import com.triz.trizservice.modeles.Machine;
|
||||
import com.triz.trizservice.modeles.Medecin;
|
||||
import com.triz.trizservice.modeles.MedecinSpecialiste;
|
||||
import com.triz.trizservice.modeles.SalleDeSoin;
|
||||
import com.triz.trizservice.service.DaoService;
|
||||
import com.triz.trizservice.modeles.ServiceFonctiongroupe;
|
||||
import com.triz.trizservice.modeles.ServiceFonctionnaliter;
|
||||
@ -20,6 +22,9 @@ import com.triz.trizservice.modeles.ServicehistoriqueConnection;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceUserCentre;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.modeles.TypeAlerteMedical;
|
||||
import com.triz.trizservice.modeles.TypeExamen;
|
||||
import com.triz.trizservice.modeles.TypealerteTypeexamen;
|
||||
import com.triz.trizservice.modeles.Wilaya;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@ -348,19 +353,75 @@ public class DaoServiceImpl implements DaoService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecinByUser(Centre centre,Medecin medecin) {
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecinByUser(Centre centre, Medecin medecin) {
|
||||
return getCurrentSession().createQuery("select s.fkUser from ServiceUserCentre s where s.fkCentre =:centre and (s.fkUser=:user or s.fkUser not in"
|
||||
+ " (select m.fkUser from Medecin m)) ").setParameter("centre", centre).setParameter("user", medecin.getFkUser()).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MedecinSpecialiste getMedecinSpecialisteByMedcinBySpecialiste(Medecin medecin, SpecialiteMedicale spc) {
|
||||
return (MedecinSpecialiste) getCurrentSession().createQuery("select s from MedecinSpecialiste s where s.fkMedecin =:medecin and s.fkSpecialite=:spc ").setParameter("spc", spc).setParameter("medecin", medecin).setMaxResults(1).uniqueResult();
|
||||
return (MedecinSpecialiste) getCurrentSession().createQuery("select s from MedecinSpecialiste s where s.fkMedecin =:medecin and s.fkSpecialite=:spc ").setParameter("spc", spc).setParameter("medecin", medecin).setMaxResults(1).uniqueResult();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecin(Centre centre) {
|
||||
return getCurrentSession().createQuery("select s.fkUser from ServiceUserCentre s where s.fkCentre =:centre and ( s.fkUser not in"
|
||||
+ " (select m.fkUser from Medecin m)) ").setParameter("centre", centre).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> List<T> getAllByCentre(Class<T> clazz, Centre centre) {
|
||||
|
||||
CriteriaBuilder cb = getCurrentSession().getCriteriaBuilder();
|
||||
|
||||
CriteriaQuery<T> cq = cb.createQuery(clazz);
|
||||
|
||||
Root<T> root = cq.from(clazz);
|
||||
|
||||
cq.select(root)
|
||||
.where(cb.equal(root.get("fkCentre"), centre));
|
||||
|
||||
return getCurrentSession()
|
||||
.createQuery(cq)
|
||||
.getResultList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getByCentre(Class<T> clazz, Centre centre) {
|
||||
|
||||
String hql
|
||||
= "select e from "
|
||||
+ clazz.getSimpleName()
|
||||
+ " e where e.fkCentre = :centre";
|
||||
|
||||
System.out.println("CLASS = " + clazz);
|
||||
System.out.println("ENTITY = " + clazz.getSimpleName());
|
||||
System.out.println("HQL = " + hql);
|
||||
|
||||
return getCurrentSession()
|
||||
.createQuery(hql, clazz)
|
||||
.setParameter("centre", centre)
|
||||
.setMaxResults(1)
|
||||
.uniqueResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Machine> getMachineBySalle(SalleDeSoin salle) {
|
||||
return getCurrentSession().createQuery("select s from Machine s where s.fkSalle =:salle ").setParameter("salle", salle).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TypeExamen> getTypeExamenByTypeAlerte(TypeAlerteMedical type) {
|
||||
return getCurrentSession().createQuery("select s from TypeExamen s,TypealerteTypeexamen m where s.id = m.fkExamen.id and m.fkAlerte=:alerte ").setParameter("alerte", type).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MedecinSpecialiste> getMedecinSpecialisteBySpecialite(SpecialiteMedicale type) {
|
||||
return getCurrentSession().createQuery("select s from MedecinSpecialiste s where s.fkSpecialite=:type ").setParameter("type", type).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TypealerteTypeexamen> getTypeAlerteExamenByTypeAlerte(TypeAlerteMedical type) {
|
||||
return getCurrentSession().createQuery("select s from TypealerteTypeexamen s where s.fkAlerte=:type ").setParameter("type", type).list();
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,8 +7,10 @@ package com.triz.trizservice.service.impl;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Consultation;
|
||||
import com.triz.trizservice.modeles.Machine;
|
||||
import com.triz.trizservice.modeles.Medecin;
|
||||
import com.triz.trizservice.modeles.MedecinSpecialiste;
|
||||
import com.triz.trizservice.modeles.SalleDeSoin;
|
||||
import com.triz.trizservice.modeles.ServiceFonctiongroupe;
|
||||
import com.triz.trizservice.modeles.ServiceFonctionnaliter;
|
||||
import com.triz.trizservice.modeles.ServiceGroupe;
|
||||
@ -20,6 +22,9 @@ import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceUserCentre;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.modeles.TypeAlerteMedical;
|
||||
import com.triz.trizservice.modeles.TypeExamen;
|
||||
import com.triz.trizservice.modeles.TypealerteTypeexamen;
|
||||
import com.triz.trizservice.modeles.Wilaya;
|
||||
import com.triz.trizservice.service.DaoService;
|
||||
import com.triz.trizservice.service.TransactionService;
|
||||
@ -335,36 +340,72 @@ public class TransactionServiceImpl implements TransactionService {
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<SpecialiteMedicale> getAllSpecialitiesByMedecin(Medecin medecin) {
|
||||
return daoService.getAllSpecialitiesByMedecin(medecin);
|
||||
return daoService.getAllSpecialitiesByMedecin(medecin);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<Consultation> getAllConsultationByMedecin(Medecin medecin) {
|
||||
return daoService.getAllConsultationByMedecin(medecin);
|
||||
return daoService.getAllConsultationByMedecin(medecin);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public <T extends Serializable> List<T> findAll(Class<T> clazz) {
|
||||
return daoService.findAll(clazz);
|
||||
return daoService.findAll(clazz);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecinByUser(Centre centre,Medecin medecin) {
|
||||
return daoService.getAllUserByCentreNotInMedecinByUser(centre,medecin);
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecinByUser(Centre centre, Medecin medecin) {
|
||||
return daoService.getAllUserByCentreNotInMedecinByUser(centre, medecin);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public MedecinSpecialiste getMedecinSpecialisteByMedcinBySpecialiste(Medecin medecin, SpecialiteMedicale spc) {
|
||||
return daoService.getMedecinSpecialisteByMedcinBySpecialiste(medecin, spc);
|
||||
return daoService.getMedecinSpecialisteByMedcinBySpecialiste(medecin, spc);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecin(Centre centre) {
|
||||
return daoService.getAllUserByCentreNotInMedecin(centre);
|
||||
return daoService.getAllUserByCentreNotInMedecin(centre);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public <T> List<T> getAllByCentre(Class<T> clazz, Centre centre) {
|
||||
return daoService.getAllByCentre(clazz, centre);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public <T> T getByCentre(Class<T> clazz, Centre centre) {
|
||||
return daoService.getByCentre(clazz, centre);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<Machine> getMachineBySalle(SalleDeSoin salle) {
|
||||
return daoService.getMachineBySalle(salle);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<TypeExamen> getTypeExamenByTypeAlerte(TypeAlerteMedical type) {
|
||||
return daoService.getTypeExamenByTypeAlerte(type);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<MedecinSpecialiste> getMedecinSpecialisteBySpecialite(SpecialiteMedicale type) {
|
||||
return daoService.getMedecinSpecialisteBySpecialite(type);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<TypealerteTypeexamen> getTypeAlerteExamenByTypeAlerte(TypeAlerteMedical type) {
|
||||
return daoService.getTypeAlerteExamenByTypeAlerte(type);
|
||||
}
|
||||
}
|
||||
|
||||
@ -662,6 +662,10 @@
|
||||
<class>com.triz.trizservice.modeles.Centre</class>
|
||||
<class>com.triz.trizservice.modeles.Queue</class>
|
||||
<class>com.triz.trizservice.modeles.Consultation</class>
|
||||
<class>com.triz.trizservice.modeles.TypealerteTypeexamen</class>
|
||||
<class>com.triz.trizservice.modeles.JoursFerier</class>
|
||||
<class>com.triz.trizservice.modeles.WeekEnd</class>
|
||||
<class>com.triz.trizservice.modeles.Filepathrapportdictee</class>
|
||||
<exclude-unlisted-classes>false</exclude-unlisted-classes>
|
||||
</persistence-unit>
|
||||
</persistence>
|
||||
|
||||
@ -631,4 +631,224 @@ ALTER TABLE consultation
|
||||
ADD COLUMN fk_patient uuid,
|
||||
ADD CONSTRAINT fk_consultation_patient
|
||||
FOREIGN KEY (fk_patient)
|
||||
REFERENCES patient(id);
|
||||
REFERENCES patient(id);
|
||||
|
||||
-- =====================================================
|
||||
-- EXTENSIONS
|
||||
-- =====================================================
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
|
||||
-- =====================================================
|
||||
-- NOUVELLES TABLES
|
||||
-- =====================================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS jours_ferier (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
titre VARCHAR(255),
|
||||
isrepetedyearly BOOLEAN DEFAULT FALSE,
|
||||
fk_centre UUID,
|
||||
category VARCHAR(100),
|
||||
created_at DATE DEFAULT CURRENT_DATE
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS week_end (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
day_of_week INTEGER NOT NULL,
|
||||
fk_centre UUID,
|
||||
description VARCHAR(255),
|
||||
created_at DATE DEFAULT CURRENT_DATE
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS type_alerte_medical (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
type VARCHAR(255) UNIQUE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS filepathrapportdictee (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
fk_consultation UUID NOT NULL,
|
||||
date DATE,
|
||||
heure TIME,
|
||||
filepath VARCHAR(1000)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS typealerte_typeexamen (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
fk_alerte UUID NOT NULL,
|
||||
fk_examen UUID NOT NULL
|
||||
);
|
||||
|
||||
-- =====================================================
|
||||
-- AJOUT DES COLONNES
|
||||
-- =====================================================
|
||||
|
||||
ALTER TABLE parametre
|
||||
ADD COLUMN IF NOT EXISTS mwlscpaet VARCHAR(255);
|
||||
|
||||
ALTER TABLE parametre
|
||||
ADD COLUMN IF NOT EXISTS mwlscpport VARCHAR(50);
|
||||
|
||||
ALTER TABLE consultation
|
||||
ADD COLUMN IF NOT EXISTS fk_ecritpar character varying;
|
||||
|
||||
ALTER TABLE type_examen
|
||||
ADD COLUMN IF NOT EXISTS poids INTEGER;
|
||||
|
||||
ALTER TABLE type_examen
|
||||
ADD COLUMN IF NOT EXISTS tempestime TIME;
|
||||
|
||||
|
||||
ALTER TABLE type_examen
|
||||
ADD COLUMN IF NOT EXISTS fk_typeexamen UUID;
|
||||
|
||||
-- =====================================================
|
||||
-- CLES ETRANGERES
|
||||
-- =====================================================
|
||||
|
||||
ALTER TABLE jours_ferier
|
||||
ADD CONSTRAINT fk_joursferier_centre
|
||||
FOREIGN KEY (fk_centre)
|
||||
REFERENCES centre(id);
|
||||
|
||||
ALTER TABLE week_end
|
||||
ADD CONSTRAINT fk_weekend_centre
|
||||
FOREIGN KEY (fk_centre)
|
||||
REFERENCES centre(id);
|
||||
|
||||
ALTER TABLE filepathrapportdictee
|
||||
ADD CONSTRAINT fk_filepathrapportdictee_consultation
|
||||
FOREIGN KEY (fk_consultation)
|
||||
REFERENCES consultation(id);
|
||||
|
||||
ALTER TABLE consultation
|
||||
ADD CONSTRAINT fk_consultation_ecritpar
|
||||
FOREIGN KEY (fk_ecritpar)
|
||||
REFERENCES service_user(userid);
|
||||
|
||||
ALTER TABLE type_examen
|
||||
ADD CONSTRAINT fk_typeexamen_machine
|
||||
FOREIGN KEY (fk_machine)
|
||||
REFERENCES machine(id);
|
||||
|
||||
ALTER TABLE type_examen
|
||||
drop column fk_typeexamen;
|
||||
|
||||
ALTER TABLE typealerte_typeexamen
|
||||
ADD CONSTRAINT fk_typealerte
|
||||
FOREIGN KEY (fk_alerte) REFERENCES type_alerte_medical(id);
|
||||
|
||||
ALTER TABLE typealerte_typeexamen
|
||||
ADD CONSTRAINT fk_typeexamen
|
||||
FOREIGN KEY (fk_examen)
|
||||
REFERENCES type_examen(id);
|
||||
|
||||
-- =====================================================
|
||||
-- DONNEES DE REFERENCE
|
||||
-- =====================================================
|
||||
|
||||
INSERT INTO type_alerte_medical(type)
|
||||
SELECT 'Allergie'
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM type_alerte_medical WHERE type='Allergie'
|
||||
);
|
||||
|
||||
INSERT INTO type_alerte_medical(type)
|
||||
SELECT 'Maladie chronique'
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM type_alerte_medical WHERE type='Maladie chronique'
|
||||
);
|
||||
|
||||
INSERT INTO type_alerte_medical(type)
|
||||
SELECT 'Traitement en cours'
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM type_alerte_medical WHERE type='Traitement en cours'
|
||||
);
|
||||
|
||||
INSERT INTO type_alerte_medical(type)
|
||||
SELECT 'Antécédents chirurgicaux'
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM type_alerte_medical
|
||||
WHERE type='Antécédents chirurgicaux'
|
||||
);
|
||||
|
||||
INSERT INTO type_alerte_medical(type)
|
||||
SELECT 'Antécédents familiaux'
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM type_alerte_medical
|
||||
WHERE type='Antécédents familiaux'
|
||||
);
|
||||
|
||||
INSERT INTO type_alerte_medical(type)
|
||||
SELECT 'Implant'
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM type_alerte_medical
|
||||
WHERE type='Implant'
|
||||
);
|
||||
|
||||
INSERT INTO type_alerte_medical(type)
|
||||
SELECT 'Handicap'
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM type_alerte_medical
|
||||
WHERE type='Handicap'
|
||||
);
|
||||
|
||||
ALTER TABLE parametre
|
||||
drop COLUMN mwlscpaet ;
|
||||
|
||||
ALTER TABLE parametre
|
||||
drop COLUMN mwlscpport ;
|
||||
|
||||
ALTER TABLE salle_de_soin
|
||||
ADD COLUMN IF NOT EXISTS fk_machine UUID;
|
||||
|
||||
ALTER TABLE salle_de_soin
|
||||
ADD CONSTRAINT fk_salle_machine
|
||||
FOREIGN KEY (fk_machine)
|
||||
REFERENCES machine(id);
|
||||
|
||||
ALTER TABLE type_examen
|
||||
drop COLUMN tempestime ;
|
||||
|
||||
ALTER TABLE salle_de_soin
|
||||
drop COLUMN fk_machine;
|
||||
|
||||
ALTER TABLE Machine
|
||||
ADD COLUMN IF NOT EXISTS fk_salle UUID;
|
||||
|
||||
ALTER TABLE Machine
|
||||
ADD CONSTRAINT fk_salle_machine
|
||||
FOREIGN KEY (fk_salle)
|
||||
REFERENCES salle_de_soin(id);
|
||||
|
||||
ALTER TABLE specialite_medicale
|
||||
ADD COLUMN id UUID;
|
||||
|
||||
UPDATE specialite_medicale
|
||||
SET id = gen_random_uuid();
|
||||
|
||||
ALTER TABLE specialite_medicale
|
||||
ALTER COLUMN id SET NOT NULL;
|
||||
|
||||
ALTER TABLE medecin_specialiste
|
||||
ADD COLUMN fk_specialite_id UUID;
|
||||
|
||||
|
||||
UPDATE medecin_specialiste ms
|
||||
SET fk_specialite_id = sm.id
|
||||
FROM specialite_medicale sm
|
||||
WHERE ms.fk_specialite = sm.name;
|
||||
|
||||
ALTER TABLE medecin_specialiste
|
||||
DROP CONSTRAINT medecin_specialiste_fk_medecin_fkey;
|
||||
|
||||
ALTER TABLE specialite_medicale
|
||||
DROP CONSTRAINT specialite_medicale_pkey;
|
||||
|
||||
ALTER TABLE specialite_medicale
|
||||
ADD CONSTRAINT specialite_medicale_pkey PRIMARY KEY(id);
|
||||
|
||||
ALTER TABLE medecin_specialiste
|
||||
ADD CONSTRAINT medecin_specialiste_fk_specialite_fkey
|
||||
FOREIGN KEY (fk_specialite_id)
|
||||
REFERENCES specialite_medicale(id);
|
||||
@ -147,7 +147,7 @@
|
||||
<p:menuitem id="m_Tiersletterage"
|
||||
value="Paramètres"
|
||||
icon="pi pi-cog"
|
||||
url="#{request.contextPath}/views/client/listeClient.xhtml?idpage=Suivis_flotte"
|
||||
url="#{request.contextPath}/views/parametrage/form.xhtml?idpage=Suivis_flotte"
|
||||
rendered="#{utilControleAccess.isshowPrivilegeAdd('param')}" />
|
||||
|
||||
</p:submenu>
|
||||
|
||||
1153
src/main/webapp/views/parametrage/form.xhtml
Normal file
1153
src/main/webapp/views/parametrage/form.xhtml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user