Examples of Diagnosis


Examples of beans.doctor.diagnosis.Diagnosis

        List list = findEntityList(Diagnosis.class, fields);

        List<DiagnosisDetails> res = new ArrayList<DiagnosisDetails>();
        Iterator i = list.iterator();
        while(i.hasNext()) {
            Diagnosis j = (Diagnosis) i.next();
            res.add(j.getDetails((RightChecker) this));
        }
        return res;
    }
View Full Code Here

Examples of beans.doctor.diagnosis.Diagnosis

        }

        List<DiagnosisDetails> res = new ArrayList<DiagnosisDetails>();
        Iterator i = list.iterator();
        while(i.hasNext()) {
            Diagnosis j = (Diagnosis) i.next();
            res.add(j.getDetails((RightChecker) this));
        }
        return res;
    }
View Full Code Here

Examples of beans.doctor.diagnosis.Diagnosis

            }
            temp.add(diagnosis);
    }
        //Пробежимся по временному массиву и исключим предварительные диагнозы если есть заключительные
        for (int i = temp.size() -1 ; i >= 0; i--) {
            Diagnosis diagnosis = temp.get(i);
            int disID = diagnosis.getServiceRender().getDisease().getId();
            if (setDisease.contains(disID)
                    && diagnosis.getType().getId() == DiagnosisType.DIAGNOSIS_TYPE_PRELIMINARY) {
                temp.remove(i);
            }
        }
        //преобразование и возврат деталей
        ArrayList<DiagnosisDetails> target = new ArrayList<DiagnosisDetails>();
        for (int i = 0; i < temp.size(); i++) {
            Diagnosis diagnosis = temp.get(i);
            target.add(diagnosis.getDetails(this));
        }
    return target;
    }
View Full Code Here

Examples of beans.doctor.diagnosis.Diagnosis

    protected void onUpdate(Followup entity, EntityDetails details,
            AuditDoc auditDoc, List<AuditDoc> auditDocList)
            throws ClipsServerException {
        FollowupDetails d = (FollowupDetails) details;
        ServiceRender serviceRender = findEntity(ServiceRender.class, d.serrenUpID);
        Diagnosis diagnosis = findEntity(Diagnosis.class, d.diagnosisUpID);
        if (diagnosis.getServiceRender().getDisease().getId() != serviceRender.getDisease().getId()){
            throw new EDataIntegrity("Услуга, по которой пациент поставлен на учёт, " +
                    "и услуга, в рамках которой поставлен диагноз, должны находиться в одном заболевании");
        }
       
        entity.setDateup(d.dateUp);
View Full Code Here

Examples of beans.doctor.diagnosis.Diagnosis

        }


        for (FollowupEvent followupEvent : list) {
            if (followupEvent.getDisease() != null){
                Diagnosis d = m.get(followupEvent.getDisease().getId());
                res.put(followupEvent.getDetails(this), d != null ? d.getMkb10().getId() : null);
            }else{
                res.put(followupEvent.getDetails(this), null);
            }
        }
        return res;
View Full Code Here

Examples of beans.doctor.diagnosis.Diagnosis

                       "ORDER BY d.date";
        Query q = manager.createQuery(query);
        q.setParameter("follupid", follupid);
        List list = q.getResultList();
        for (int i = 0; i < list.size(); i++) {
            Diagnosis diag = (Diagnosis) list.get(i);
            res.add(diag.getDetails(this));
        }
        return res;
    }
View Full Code Here

Examples of beans.doctor.diagnosis.Diagnosis

                ArrayList<Diagnosis> diagList = new ArrayList<Diagnosis>();
                for (EventKey eventKey : eventKeyList) {
                    diagList.add(findEntity(Diagnosis.class, eventKey.diagID));
                }

                Diagnosis diagUp = diagList.get(0);
                /*определяем diagDown - если при последнем диагнозе было снятие с
                 диспансеризации то diagDown не нулл
                 * */
                Diagnosis diagDown = diagList.get(diagList.size() - 1);
                int disp = 0;
                int dispSn = 0;
                for (EventKey eventKey : eventKeyList) {
                    if (eventKey.diagID == diagDown.getId()) {
                        disp = eventKey.disp;
                        dispSn = eventKey.dispSn;
                    }
                }
                if (disp != 4) {
                    diagDown = null;
                }

                Followup followup = new Followup();
                followup.setDateup(diagUp.getDate());
                followup.setDatedown(diagDown == null ? null : diagDown.getDate());
                followup.setCollaboratorUp(diagUp.getServiceRender().getDisease().getCollaborator());
                followup.setCollaboratorDown(diagDown == null ? null : diagDown.getServiceRender().getDisease().getCollaborator());
                followup.setUpReason(upReason);
                FollowDownReason fd = fdmap.get(dispSn);
                if (fd == null) {
                    fd = downReason;
                }
                followup.setDownReason(diagDown == null ? null : fd);
                followup.setValue(null);
                followup.setSerrenUp(diagUp.getServiceRender());
                followup.setSerrenDown(diagDown == null ? null : diagDown.getServiceRender());
                followup.setDiagnosisUp(diagUp);
                manager.persist(followup);
                for (Diagnosis diagnosis : diagList) {
                    FollowupEvent followupEvent = new FollowupEvent();
                    followupEvent.setFollup(followup);
View Full Code Here

Examples of beans.doctor.diagnosis.Diagnosis

            if ((counter % 10000) == 0) {
                System.out.println("Загрузка и подсчет диагнозов - выполнено " + counter/((float)diagnosisList.size())*100 + "% (" + counter + ") запись");
                manager.clear();
        System.gc();
            }
            Diagnosis diagnosis = findEntity(Diagnosis.class, diagID);
            int dsID = diagnosis.getServiceRender().getDisease().getId();
            Integer value = mapDisease.get(dsID);
            value ++;
            mapDisease.put(dsID, value);
            counter ++;
        }
View Full Code Here

Examples of net.xeoh.plugins.diagnosis.local.Diagnosis

     *
     */
    @Test
    public void benchmark() {
        Assert.assertNotNull(this.pm);
        final Diagnosis diagnosis = this.pm.getPlugin(Diagnosis.class);

        long a = System.currentTimeMillis();
        for(int i=0; i<10000;i++) {
            diagnosis.channel(LoggingChannel1.class).status(""+i);
        }
        long b = System.currentTimeMillis();
        System.out.println(b-a);

        DiagnosisChannel<String> channel = diagnosis.channel(LoggingChannel2.class);
        a = System.currentTimeMillis();
        for(int i=0; i<10000;i++) {
            channel.status(""+i);
        }
        b = System.currentTimeMillis();
View Full Code Here

Examples of net.xeoh.plugins.diagnosis.local.Diagnosis

     */
    @SuppressWarnings("boxing")
    @Test
    public void testGetPluginClassOfP() {
        Assert.assertNotNull(this.pm);
        final Diagnosis diagnosis = this.pm.getPlugin(Diagnosis.class);
       
        diagnosis.channel(LoggingChannel1.class).status("Starting Test.");
        diagnosis.channel(TestChannel.class).status(100);
        diagnosis.channel(TestChannel.class).status(100);
        diagnosis.channel(TestChannel.class).status(100);
        diagnosis.channel(TestChannel.class).status(3000);
        diagnosis.channel(LoggingChannel1.class).status("Initializing Status");
       
       
        DiagnosisUtil util = new DiagnosisUtil(diagnosis);
        util.registerMonitors(new DiagnosisMonitor<Serializable>() {
            @Override
            public void onStatusChange(DiagnosisStatus<Serializable> status) {
                if(status.getChannel().equals(TestChannel.class)) System.out.println("TC");
                System.out.println(">>> " + status.getValue());
            }
        }, TestChannel.class, LoggingChannel1.class);

        diagnosis.channel(TestChannel.class).status(6667);
        diagnosis.channel(TestChannel.class).status(100);

  
        util.registerCondition(new TwoStateMatcherAND() {
            /** */
            @Override
            protected void setupMatcher() {
                match(TestChannel.class, new Is(100));
                match(LoggingChannel1.class, new Contains("xtatus"));
            }
           
            /** */
            @Override
            public void stateChanged(STATE state) {
                System.out.println("STATE CJAMGE" + state);
            }
        });
        diagnosis.channel(TestChannel.class).status(3000);
        diagnosis.channel(TestChannel.class).status(100);

        //D2 d;
        //diagnosis.status(URI.create(TestChannel.class, "xxx"), 300);
        //diagnosis.channel(LoggingChannel1.class).status("start/x");

        //DiagnosisCondition condition = new TestCondition();
        //condition
        //diagnosis.registerCondition(condition);
       
       
        // Was ist mit Multi-Threading?
        // T1: start() -> state1 -> state2 ....        -> state4
        // T2:                      start() -> state1
        // In dem Fall würde der Sensor sehen
        // s1 s2 s1 s4 s2 s5 ...
        // Und könnte nicht wirklich eine sinnvolle condition definieren.
       
        // Andererseits, wir haben den Thread-Status dabei, so dass jeder Thread seine eigene
        // time-line bekommt, bzw. bekommen kann
       
        // Das würde bedeuten, dass es keinen einzigen Zustand s gibt, sondern eine unbestimmte menge davon.
       
        // Wie macht man das nun mit conditions?
       
        // if(s == 1 && t == 3)?
        // if(s(threadA) == 1 && t(threadA) == 3)?
       
       
       
        // Frage, wie kann ich einzelne Kanäle deaktivieren, die z.b: eine Hohe Last oder Debugausgaben verursachen?
        // An die komme ich nämlich nicht einfach ran, wenn die in einem Plugin verborgen sind.
        // --> InformationBroker
                     
       
        // Soll es eine Replay-API geben?
        // --> Nicht notwendig, wenn es Tools zur Analyse in JSPF mit dazu gibt (z.B. Extraktor & Konverter)
       
       
        // Was ist mit den serialisierten Werten, die können vom Tool nicht zurückgelesen werden, sofern es spezielle
        // Werte sind.
        // --> Müssen im Classpath mit aufgenommen werden, oder werden halt nicht wiede de-serialisiert
       
       
        // Wird das nicht langsam sein?
        // --> Ist nicht gedacht für high-volume recording, sondern eher für sagen wir <100 Nachrichten pro Sekunde
        // auf Pluginebene.
       
       
        // Was ist mit Erklärungen f. Messwerte, Conditions, usw. Die wären im Replay-Tool nicht verfügbar, insbesondere
        // nicht, wenn die zur Laufzeit zusammengeschuhstert werden müssen
        // --> Muss auf Klassenebene der Channels passieren, dort Konverter usw. reinzumachen
       

        // Würde ein Recording auf den Channels mit primitiven Typen nicht viel schneller sein?
        // z.B. diagnosis.channel(TestChannel.class).reportInt(30)
        // dann hätte man auch keine Probleme beim De-Serialisieren
        // --> Mmhm, ist was dran. Ist aber weniger elegant, außerdem können dann auf einem Channel
        // Werte gemischt werden. Ich behaupte einfach mal dass in Richtung Java 7,8,9 Boxing-Typen
        // irgendwann gleichschnell wie primitive Typen behandelt werden können. Und das Problem
        // beim entpacken kann der Entwickler einfach dadurch lösen, dass er halt nur eingebaute Typen
        // nimmt ...
       
       
        // Q1: How does the condition access diagnosis-internal functions/variables?
        // Q2: How do we associate conditions with messages / remedies / ...?
        // Q3: Who fires *when* and *how* and triggers *what* when a condition is met?
        diagnosis.channel(LoggingChannel1.class).status("Ending Test.");    
    }
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.