Package systole.domain.clinicalInformation

Examples of systole.domain.clinicalInformation.Family


        this.entityName = "Familiar";
    }

    @Override
    protected void loadEntityOnForm() {
        Family familyToLoad = (Family) this.curretnEntity;
        JDialogFamily formToLoad = (JDialogFamily) this.editForm;
        formToLoad.getjEdtDescription().setText(familyToLoad.getName());
        formToLoad.getjCbmSex().setSelectedItem(familyToLoad.getSex());
    }
View Full Code Here


        formToLoad.getjCbmSex().setSelectedItem(familyToLoad.getSex());
    }

    @Override
    protected void loadEntityFromForm() {
        Family familyToLoad = (Family) this.curretnEntity;
        JDialogFamily formToLoad = (JDialogFamily) this.editForm;

        familyToLoad.setName(formToLoad.getjEdtDescription().getText());
        familyToLoad.setSex((String) formToLoad.getjCbmSex().getSelectedItem());
        familyToLoad.setLastUpdate(Calendar.getInstance());

    }
View Full Code Here

    }

    @Override
    protected String valid() {
        JDialogFamily formToLoad = (JDialogFamily) this.editForm;
        Family family = (Family) this.curretnEntity;

        if ((formToLoad.getjEdtDescription().getText() == null) || (formToLoad.getjEdtDescription().getText().isEmpty())) {
            return "Debe ingresar la descripción";
        }

        try {
            if (this.facadeDB.getFamilyBroker().existFamily(formToLoad.getjEdtDescription().getText(), family.getId())) {
                return "Ya existe un familiar con la descripción ingresada";
            }
        } catch (ExceptionDAO ex) {
            this.facadeDB.refreshSession();
            return ex.getMessage();
View Full Code Here

        this.editForm.setIconImage(ImageUtils.buildImage("resources/icons/family/family16.png"));
    }

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

    public boolean uploadFamily() {
        try {
            this.log.logDebug("Start to upload Family");
            Iterator<Family> familyToUpload = this.facadeDB.getFamilySyncBroker().getFamiliesToUpload().iterator();
            while (familyToUpload.hasNext()) {
                Family family = familyToUpload.next();
                FamilyWs familyWs = this.toRemoteEntity.generateRemoteFamily(family);
                if (familyWs != null) {
                    int remoteId = this.systoleSync.uploadFamily(familyWs);
                    if (remoteId > 0) {
                        FamilyRemote familyRemote = new FamilyRemote(family);
View Full Code Here

            if ((form.getCmbRelatives().getSelectedIndex() == -1) || (form.getCmbRelatives().getSelectedItem() == null)) {
                return "Debe seleccionar un familiar";
            }

            try {
                Family family = (Family) form.getCmbRelatives().getSelectedItem();

                if (this.facadeDB.getFamilyBackgroundBroker().existFamilyPatientBackground(family, this.patient)) {
                    return "Ya fueron cargados los antecedentes del familiar";
                }
            } catch (ExceptionDAO ex) {
View Full Code Here

    public void saveFamily(FamilyWs familyWs) throws ExceptionDAO {
        if (familyWs == null) {
            return;
        }
        FacadeDB.getInstance().startTransaction();
        Family family = FacadeDB.getInstance().getFamilyBroker().getFamilyByName(familyWs.getName());
        if (family == null) {
            family = new Family();
            family.setName(familyWs.getName());
            family.setSex(familyWs.isSex() ? "M" : "F");
            FacadeDB.getInstance().getFamilyBroker().insert(family);
            FamilyRemote familyRemote = new FamilyRemote(family);
            familyRemote.setRemoteId(familyWs.getId());
            FacadeDB.getInstance().getFamilySyncBroker().saveFamilyRemote(familyRemote);
        } else {
View Full Code Here

     */
    private FamilyPatientBackground convertToLocalPatientFamilyBackground(PatientFamilyWs patientFamilyWs, Patient patient) throws ExceptionDAO {
        if (patientFamilyWs == null) {
            return null;
        }
        Family family = FacadeDB.getInstance().getFamilySyncBroker().getFamilyByRemoteId(patientFamilyWs.getFamilyId());
        if (family == null) {
            return null;
        }
        FamilyPatientBackground familyPatientBackground = new FamilyPatientBackground();
        FamilyPatientBackgroundId id = new FamilyPatientBackgroundId(family.getId(), patient.getId());
        familyPatientBackground.setId(id);
        familyPatientBackground.setFamily(family);
        familyPatientBackground.setPatient(patient);
        familyPatientBackground.setBackgroundCardiac(patientFamilyWs.isBackgroundCardiac());
        familyPatientBackground.setBackgroundCholesterol(patientFamilyWs.isBackgroundCholesterol());
View Full Code Here

TOP

Related Classes of systole.domain.clinicalInformation.Family

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.