Package systole.domain.clinicalInformation

Examples of systole.domain.clinicalInformation.Pathology


    /* (non-Javadoc)
     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityFromForm()
     */
    @Override
    protected void loadEntityFromForm() {
        Pathology pathologyToLoad = (Pathology) this.curretnEntity;
        JDialogPathology formToLoad = (JDialogPathology) this.editForm;

        pathologyToLoad.setName(formToLoad.getjEdtName().getText());
        pathologyToLoad.setInitials(formToLoad.getjEdtInitials().getText().isEmpty() ? null : formToLoad.getjEdtInitials().getText());
        pathologyToLoad.setDescription(formToLoad.getjTxtDescription().getText());
        pathologyToLoad.setLastUpdate(Calendar.getInstance());

    }
View Full Code Here


     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityOnForm()
     */
    @Override
    protected void loadEntityOnForm() {
        JDialogPathology formToLoad = (JDialogPathology) this.editForm;
        Pathology currentPathology = (Pathology) this.curretnEntity;
        formToLoad.getjEdtName().setText(currentPathology.getName());
        formToLoad.getjEdtInitials().setText(currentPathology.getInitials());
        formToLoad.getjTxtDescription().setText(currentPathology.getDescription());
    }
View Full Code Here

     * @see systole.view.crud.controller.ControllerEntityEdition#valid()
     */
    @Override
    protected String valid() {
        JDialogPathology formToValid = (JDialogPathology) this.editForm;
        Pathology pathology = (Pathology) this.curretnEntity;
        if ((formToValid.getjEdtName().getText() == null) || (formToValid.getjEdtName().getText().isEmpty())) {
            return "Debe Ingresar el nombre de la patología";
        }

        try {

            if (this.facadeDB.getPathologyBroker().existPathologyByName(formToValid.getjEdtName().getText(), pathology.getId())) {
                return "Ya existe una patología con el nombre ingresado";
            }

            if ((formToValid.getjEdtInitials().getText() != null) && (!formToValid.getjEdtInitials().getText().isEmpty())) {
                if (this.facadeDB.getPathologyBroker().existPathologyByInitials(formToValid.getjEdtInitials().getText(), pathology.getId())) {
                    return "Ya existe una patología con la sigla ingresada";
                }
            }

        } catch (ExceptionDAO ex) {
View Full Code Here

        this.editForm.setIconImage(ImageUtils.buildImage("resources/icons/medic/pathology16.png"));
    }

    @Override
    protected Object createEntity() {
        return new Pathology();
    }
View Full Code Here

    public boolean uploadPathologies() {
        try {
            this.log.logDebug("Start to upload Pathologies");
            Iterator<Pathology> pathologiesToUpload = this.facadeDB.getPathologySyncBroker().getPathologiesToUpload().iterator();
            while (pathologiesToUpload.hasNext()) {
                Pathology pathology = pathologiesToUpload.next();
                PathologyWs pathologyWs = this.toRemoteEntity.generateRemotePathology(pathology);
                if (pathologyWs != null) {
                    int remoteId = this.systoleSync.uploadPathology(pathologyWs);
                    if (remoteId > 0) {
                        PathologyRemote pathologyRemote = new PathologyRemote(pathology);
View Full Code Here

     */
    @Override
    protected void loadEntityOnForm() {
        JDialogPathologyByPatient form = (JDialogPathologyByPatient) this.editForm;
        PathologyPatient pathologyPatient = (PathologyPatient) this.curretnEntity;
        Pathology pathology = pathologyPatient.getPathology();
        form.getCmbPathologies().setSelectedItem(pathology);
        form.getChkInherited().setSelected((pathologyPatient.getInherited() == null) ? false : pathologyPatient.getInherited());
        form.getChkPresentToday().setSelected((pathologyPatient.getCurrently() == null) ? false : pathologyPatient.getCurrently());
        form.getjSpnYears().setValue(pathologyPatient.getAgeAtStartAsInteger());
    }
View Full Code Here

            JDialogPathologyByPatient form = (JDialogPathologyByPatient) this.editForm;
            if ((form.getCmbPathologies().getSelectedIndex() == -1) || (form.getCmbPathologies().getSelectedItem() == null)) {
                return "Debe seleccionar una patología";
            }
            try {
                Pathology pathology = (Pathology) form.getCmbPathologies().getSelectedItem();
                if (this.facadeDB.getPathologyByPatienBroker().existPathologyByPatient(pathology, this.patient)) {
                    return "Ya existe la patología para el paciente";
                }
            } catch (ExceptionDAO ex) {
                this.facadeDB.refreshSession();
View Full Code Here

    public void savePathology(PathologyWs pathologyWs) throws ExceptionDAO {
        if (pathologyWs == null) {
            return;
        }
        FacadeDB.getInstance().startTransaction();
        Pathology pathology = FacadeDB.getInstance().getPathologyBroker().getPathologyByName(pathologyWs.getName());
        if ((pathology == null) && (pathologyWs.getInitials() != null)) {
            pathology = FacadeDB.getInstance().getPathologyBroker().getPathologyByInitials(pathologyWs.getInitials());
        }
        if (pathology == null) {
            pathology = new Pathology();
            pathology.setName(pathologyWs.getName());
            pathology.setDescription(pathologyWs.getDescription());
            pathology.setInitials(pathologyWs.getInitials());
            FacadeDB.getInstance().getPathologyBroker().insert(pathology);
            PathologyRemote pathologyRemote = new PathologyRemote(pathology);
            pathologyRemote.setRemoteId(pathologyWs.getId());
            FacadeDB.getInstance().getPathologySyncBroker().savePathologyRemote(pathologyRemote);
        } else {
View Full Code Here

     */
    private PathologyPatient convertToLocalPatientPathology(PatientPathologyWs patientPathologyWs, Patient patient) throws ExceptionDAO {
        if (patientPathologyWs == null) {
            return null;
        }
        Pathology pathology = FacadeDB.getInstance().getPathologySyncBroker().getPathologyByRemoteId(patientPathologyWs.getPathologyId());
        if (pathology == null) {
            return null;
        }
        PathologyPatient pathologyPatient = new PathologyPatient();
        PathologyPatientId id = new PathologyPatientId(pathology.getId(), patient.getId());
        pathologyPatient.setId(id);
        Integer difAges = patient.getAge() - patientPathologyWs.getAgeAtStart();
        pathologyPatient.setAgeAtStartAsInteger(difAges);
        pathologyPatient.setCurrently(patientPathologyWs.isCurrently());
        pathologyPatient.setInherited(patientPathologyWs.isInherited());
View Full Code Here

TOP

Related Classes of systole.domain.clinicalInformation.Pathology

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.