Examples of MedicinePatient


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

Examples of systole.domain.clinicalInformation.MedicinePatient

     * @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

Examples of systole.domain.clinicalInformation.MedicinePatient

     * @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

Examples of systole.domain.clinicalInformation.MedicinePatient

     * @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

Examples of systole.domain.clinicalInformation.MedicinePatient

    protected void loadIconOnForm() {
    }

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

Examples of systole.domain.clinicalInformation.MedicinePatient

        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

Examples of systole.domain.clinicalInformation.MedicinePatient

        }
        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
Copyright © 2018 www.massapi.com. 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.