Package beans.user.collaborator.entities

Examples of beans.user.collaborator.entities.Collaborator


        if (d.id == 0) {
            ConfigBeanRemoteM conf = getBean(ConfigBeanM.class);
            int regionCode = conf.getInteger(ConfigParametr.REGION_CODE_ID);

            //TODO0 какой иншурер выбрать?
            Collaborator collab = findEntity(Collaborator.class, getCollaborator().getId());
            int insurerID = collab.getLpu().getInsurer().getId();

            AuditDoc<Polis> auditDoc = new AuditDoc<Polis>(null, getCollaborator());
            Polis polis = new Polis();
            polis.setClient(findEntity(Client.class, d.clientID));
            polis.setCollaborator(findEntity(Collaborator.class, getCollaboratorId()));
View Full Code Here


  AbstractTablesSelector<?> createTableSelector(AbstractReportTable table, Lpu lpu, DateRange range, int tableId) throws ClipsServerException{
    return new ReportTableFactory().createTableSelector(manager, lpu, table, tableId, range);
  }
 
  JRDataSource getMainDataSourse(int year) throws ClipsServerException{
    Collaborator  cool = findEntity(Collaborator.class, getCollaboratorId());
    Lpu        lpu = cool.getLpu();
        DiseaseReport entity = getExistentEntity();
    ArrayList<Map<String, Object>>  mainData = new ArrayList<Map<String, Object>>();
    Element                    xml = entity.getDetails((RightChecker) this).getXml();
    ReportTableFactory              factory = new ReportTableFactory();
    ArrayList<AbstractReportTable<?>>      list = factory.parseXml(xml);
View Full Code Here

    @Override
    public List<RecipeData> getRecipeDataList(Date begin, Date end) throws ClipsServerException {
        ConfigBeanRemoteM conf = getBean(ConfigBeanM.class);

        Collaborator collaborator = findEntity(Collaborator.class, getCollaborator().getId());
        Lpu lpu = collaborator.getLpu();
        String lpuTFOMScode = lpu.getLpuCode() != null ? lpu.getLpuCode() : "";

        List<RecipeData> res = new ArrayList<RecipeData>();

        Field[] f = new Field[]{
            new Field("date", begin, Field.OPERATOR_EQUAL_OR_MORE),
            new Field("date", end, Field.OPERATOR_EQUAL_OR_LESS),
        };
        List<PrescriptionDlo> recipeList = findEntityList(PrescriptionDlo.class, f);
        for (PrescriptionDlo pr : recipeList) {
            if (!pr.getServiceRender().isRendered()) {
                continue;
            }
            RecipeData data = new RecipeData();

            data.id = pr.getId();

            Client cl = pr.getServiceRender().getPolis().getClient();
            data.snils = cl.getSnils();

            data.lpuTFOMScode = lpuTFOMScode;

            String sql = "SELECT fc FROM FacilityClient fc " +
                "WHERE fc.surname = :surname " +
                "AND fc.name = :name " +
                "AND fc.pathronymic = :pathronymic " +
                "AND fc.snils = :snils";
            Query query = manager.createQuery(sql);
            query.setParameter("surname", cl.getSurname());
            query.setParameter("name", cl.getName());
            query.setParameter("pathronymic", cl.getPathronymic());
            query.setParameter("snils", cl.getSnils());
            List<FacilityClient> fcList = query.getResultList();
            if (!fcList.isEmpty()) {
                FacilityClient fc = fcList.get(0);
                Excemption ex = fc.getExcemption1();
                if (ex == null) {
                    ex = fc.getExcemption2();
                }
                if (ex != null) {
                    data.exemptionID = ex.getExtKey();
                }
            }

            Polis polisOMI = clientPolisMap.get(cl.getId());
            if (polisOMI != null) {
                String polisSN ="";
                if (polisOMI.getSeries() != null) {
                    polisSN = polisOMI.getSeries();
                }
                if (polisOMI.getNumber() != null) {
                    polisSN = polisSN + " " + polisOMI.getNumber();
                }
                data.polisSN = polisSN.trim();
            }

            data.lpuOGRN = lpu.getOgrn() != null ? lpu.getOgrn() : "";
           
            Collaborator collab = pr.getServiceRender().getFunctions().getCollaborator();
            data.collabCode = lpuTFOMScode + " " + collab.getCode();

            data.mkbCode = pr.getDiagnosis().getMkb10().getCode();

            String recipeSN ="";
            if (pr.getSeries() != null) {
View Full Code Here

TOP

Related Classes of beans.user.collaborator.entities.Collaborator

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.