Beispiel #1
0
  public static void show(long patientID, long partnerID) {
    Patient patient = Patient.findById(patientID);
    SYPartner last = SYPartner.getLastActif(partnerID, patient);
    List<SYPartner> partners = SYPartner.byPatientAndActif(patient);
    long nbOlds = SYPartner.nbOlds(patient);

    render(patient, last, partners, nbOlds);
  }
Beispiel #2
0
  public static void save(SYPartner partner, long patientID) {
    if (partner.creationDate == null) {
      partner.creationDate = new GregorianCalendar();
      Patient patient = Patient.findById(patientID);
      partner.patient = patient;
      partner.actif = true;
    }

    partner.save();
    if (flash.get("error") == null) {
      flash.put("success", "saved");
    }

    flash.keep();

    SYPartners.show(partner.patient.id, partner.id);
  }
Beispiel #3
0
 public static void showOlds(long patientID) {
   Patient patient = Patient.findById(patientID);
   List<SYPartner> partners = SYPartner.getOlds(patient);
   render(partners);
 }