Package systole.domain.persons

Examples of systole.domain.persons.Medic


    @Override
    public Medic getMedicById(Integer id) throws ExceptionDAO {
        try {
            this.logger.logDebug("getting medic instance");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            Medic instance = (Medic) currentSession.get(Medic.class, id);
            this.logger.logDebug("get medic successfully");
            return instance;
        } catch (HibernateException e) {
            this.logger.logError("error on get medic by id, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudo obtener el Médico", e.fillInStackTrace());
View Full Code Here


        pat.setFont(new Font(Font.FontFamily.TIMES_ROMAN, 14, Font.BOLD));
        this.document.add(pat);
        this.document.add(Chunk.NEWLINE);
        this.document.add(Chunk.NEWLINE);

        Medic medic = analysis.getMedic();
        if (medic != null) {
            Chunk med = new Chunk(ReportTexts.request_by + medic.getFullName());
            med.setFont(new Font(Font.FontFamily.TIMES_ROMAN, 12, Font.BOLD));
            this.document.add(med);
            this.writeEmptyLine();
        }
View Full Code Here

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

        medicToLoad.setSurname(formToLoad.getjEdtSurname().getText());
        medicToLoad.setName(formToLoad.getjEdtName().getText());

        if (medicToLoad.getIdentityCard() == null) {
            medicToLoad.setIdentityCard(new IdentityCard());
        }

        medicToLoad.getIdentityCard().setCardType(
                (IdentityCardType) formToLoad.getjCbmIdentityType().getSelectedItem());
        try {
            medicToLoad.getIdentityCard().setNumber(
                    Integer.parseInt(formToLoad.getjEdtIdentityNumber().getText()));
        } catch (NumberFormatException e) {
            medicToLoad.getIdentityCard().setCardType(null);
        }

        medicToLoad.setSex((String) formToLoad.getjCbmSex().getSelectedItem());
        formToLoad.getjCbmSex().setSelectedItem(medicToLoad.getSex());
        medicToLoad.setCellphone(formToLoad.getjEdtCellphone().getText());
        medicToLoad.setEmail(formToLoad.getjEdtMail().getText());
        medicToLoad.setTelephone(formToLoad.getjEdtTelephone().getText());
        medicToLoad.setBirthdate(formToLoad.getjXDatePickerBirthdate().getDate());
        medicToLoad.setSpecialty(formToLoad.getjTxtSpeciality().getText());
        medicToLoad.setLicense(formToLoad.getjTxtLicense().getText());
        medicToLoad.setLastUpdate(Calendar.getInstance());
    }
View Full Code Here

     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityOnForm()
     */
    @Override
    protected void loadEntityOnForm() {
        JDialogMedic formToLoad = (JDialogMedic) this.editForm;
        Medic currentMedic = (Medic) this.curretnEntity;
        formToLoad.getjEdtSurname().setText(currentMedic.getSurname());
        formToLoad.getjEdtName().setText(currentMedic.getName());
        if (currentMedic.getIdentityCard() != null) {
            formToLoad.getjCbmIdentityType().setSelectedItem(
                    currentMedic.getIdentityCard().getCardType());
            formToLoad.getjEdtIdentityNumber().setText(
                    currentMedic.getIdentityCard().getNumber().toString());
        }
        formToLoad.getjCbmSex().setSelectedItem(currentMedic.getSex());
        formToLoad.getjEdtCellphone().setText(currentMedic.getCellphone());
        formToLoad.getjEdtMail().setText(currentMedic.getEmail());
        formToLoad.getjEdtTelephone().setText(currentMedic.getTelephone());
        formToLoad.getjXDatePickerBirthdate().setDate(
                currentMedic.getBirthdate());
        formToLoad.getjTxtSpeciality().setText(currentMedic.getSpecialty());
        formToLoad.getjTxtLicense().setText(currentMedic.getLicense());
    }
View Full Code Here

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

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

    public boolean uploadMedics() {
        try {
            this.log.logDebug("Start to upload medics");
            Iterator<Medic> medicsToUpload = this.facadeDB.getMedicSyncBroker().getMedicsToUpload().iterator();
            while (medicsToUpload.hasNext()) {
                Medic medic = medicsToUpload.next();
                MedicWs medicWs = this.toRemoteEntity.generateRemoteMedic(medic);
                if (medicWs != null) {
                    int remoteId = this.systoleSync.uploadMedic(medicWs);
                    if (remoteId > 0) {
                        MedicRemote medicRemote = new MedicRemote(medic);
View Full Code Here

    }

    public void applyFilter() {
        if (this.changeFilter) {

            Medic medic = (this.analysisView.getjChkMedic().isSelected() ? (Medic) this.analysisView.getjCmbMedics().getSelectedItem() : null);
            Patient patient = (this.analysisView.getjChkPatient().isSelected() ? (Patient) this.analysisView.getjCmbPatients().getSelectedItem() : null);
            Date date = (this.analysisView.getjChkDate().isSelected() ? this.analysisView.getjXDateAnalysis().getDate() : null);
            try {
                this.entityList = this.facadeDB.getAnalysisBroker().getAnalysisByDateMedicaPatiente(date, patient, medic);
                this.tableModel.refreshList(this.entityList);
View Full Code Here

    public void saveMedic(MedicWs medicWs) throws ExceptionDAO {
        if (medicWs == null) {
            return;
        }
        FacadeDB.getInstance().startTransaction();
        Medic medic = new Medic();
        medic.setName(medicWs.getName());
        medic.setSurname(medicWs.getSurname());
        medic.setAddress(medicWs.getAddress());
        medic.setBirthdate(this.xmlGregorianCalendarToDate(medicWs.getBirthdate()));
        medic.setCellphone(medicWs.getCellphone());
        medic.setCity(medicWs.getCity());
        medic.setEmail(medicWs.getEmail());
        medic.setTelephone(medicWs.getTelephone());
        medic.setIdentityCard(this.convertToLocalIdentityCard(medicWs.getIdentityCard()));
        FacadeDB.getInstance().getMedicBroker().insert(medic);
        MedicRemote medicRemote = new MedicRemote(medic);
        medicRemote.setRemoteId(medicWs.getId());
        FacadeDB.getInstance().getMedicSyncBroker().saveMedicRemote(medicRemote);
        FacadeDB.getInstance().commitTransaction();
View Full Code Here

TOP

Related Classes of systole.domain.persons.Medic

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.