Package systole.domain.clinicalInformation

Examples of systole.domain.clinicalInformation.MedicinePatient


        Vector<String> result = new Vector<String>();

        int amount = (maxAmount > 0 ? maxAmount : this.getMedicines().size());

        while ((it.hasNext()) && (amount > 0)) {
            MedicinePatient medicine = it.next();
            result.add(medicine.toString());
            amount--;
        }
        return result;
    }
View Full Code Here


     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityFromForm()
     */
    @Override
    protected void loadEntityFromForm() {
        JDialogMedicineByPatient form = (JDialogMedicineByPatient) this.editForm;
        MedicinePatient medicinePatient = (MedicinePatient) this.curretnEntity;
        medicinePatient.setMedicine((Medicine) form.getCmbMedicines().getSelectedItem());
        medicinePatient.setDosage(form.getTxtDosage().getText());
        Integer age = (Integer) form.getjSpnYears().getValue();
        medicinePatient.setAgeAtStartAsInteger(age);
    }
View Full Code Here

     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityOnForm()
     */
    @Override
    protected void loadEntityOnForm() {
        JDialogMedicineByPatient form = (JDialogMedicineByPatient) this.editForm;
        MedicinePatient medicinePatient = (MedicinePatient) this.curretnEntity;
        form.getCmbMedicines().setSelectedItem(medicinePatient.getMedicine());
        form.getTxtDosage().setText((medicinePatient.getDosage() == null) ? "" : medicinePatient.getDosage());
        Integer age = medicinePatient.getAgeAtStartAsInteger();
        form.getjSpnYears().setValue(age);
    }
View Full Code Here

     * @see systole.view.crud.controller.ControllerEntityEdition#save()
     */
    @Override
    protected void save() {
        if (!this.isEditing()) {
            MedicinePatient medicinePatient = (MedicinePatient) this.curretnEntity;
            medicinePatient.setId(new MedicinePatientId(medicinePatient.getMedicine().getId(), medicinePatient.getPatient().getId()));
            this.patient.getMedicinesPatient().add(medicinePatient);
        }
    }
View Full Code Here

    protected void loadIconOnForm() {
    }

    @Override
    protected Object createEntity() throws ExceptionDAO {
        return new MedicinePatient(this.patient);
    }
View Full Code Here

        patient.setHabitPatient(this.convertToLocalHabitPatient(patientWs.getHabits(), patient));

        if (patientWs.getMedicines() != null) {
            Iterator<PatientMedicineWs> medicines = patientWs.getMedicines().iterator();
            while (medicines.hasNext()) {
                MedicinePatient medicinePatient = this.convertToLocalPatientMedicine(medicines.next(), patient);
                if (medicinePatient != null) {
                    patient.getMedicinesPatient().add(medicinePatient);
                }
            }
        }
View Full Code Here

        }
        Medicine medicine = FacadeDB.getInstance().getMedicineSyncBroker().getMedicineByRemoteId(patientMedicineWs.getMedicineId());
        if (medicine == null) {
            return null;
        }
        MedicinePatient medicinePatient = new MedicinePatient();
        MedicinePatientId id = new MedicinePatientId(medicine.getId(), patient.getId());
        medicinePatient.setId(id);
        medicinePatient.setMedicine(medicine);
        medicinePatient.setPatient(patient);
        Integer difAges = patient.getAge() - patientMedicineWs.getAgeAtStart();
        medicinePatient.setAgeAtStartAsInteger(difAges);
        medicinePatient.setDosage(patientMedicineWs.getDosage());
        return medicinePatient;
    }
View Full Code Here

TOP

Related Classes of systole.domain.clinicalInformation.MedicinePatient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.