Package ke.go.moh.oec.reception.data

Examples of ke.go.moh.oec.reception.data.Notification


                        + new SimpleDateFormat("dd/MM/yyyy").format(person.getLastMoveDate()) + ".";
            } else {
                additionalInformation = this.getLongName() + " migrated from an unspecified village to '"
                        + this.getVillageName() + "' village on an unspecified date.";
            }
            notificationList.add(new Notification(this, Notification.Type.MIGRATION, person.getLastMoveDate(), additionalInformation));
        }
        if (person.getExpectedDeliveryDate() != null) {
            String additionalInformation = "";
            additionalInformation = this.getLongName() + " is pregnant. Her expected delivery date is "
                    + new SimpleDateFormat("dd/MM/yyyy").format(person.getExpectedDeliveryDate()) + ".";
            notificationList.add(new Notification(this, Notification.Type.PREGNANCY, person.getExpectedDeliveryDate(), additionalInformation));
        }
        if (person.getPregnancyEndDate() != null) {
            Person.PregnancyOutcome pregnancyOutcome = person.getPregnancyOutcome();
            String additionalInformation = this.getLongName();
            if (pregnancyOutcome != null) {
                if (pregnancyOutcome == Person.PregnancyOutcome.multipleBirths) {
                    additionalInformation = additionalInformation + " had multiple births";
                } else if (pregnancyOutcome == Person.PregnancyOutcome.singleBirth) {
                    additionalInformation = additionalInformation + " had a single birth";
                } else if (pregnancyOutcome == Person.PregnancyOutcome.stillBirth) {
                    additionalInformation = additionalInformation + " had a still birth";
                }
            } else {
                additionalInformation = additionalInformation + "'s pregnancy came to an unspecified end";
            }
            additionalInformation = additionalInformation + " on "
                    + new SimpleDateFormat("dd/MM/yyyy").format(person.getPregnancyEndDate()) + ".";
            notificationList.add(new Notification(this, Notification.Type.PREGNANCY_OUTCOME, person.getPregnancyEndDate(), additionalInformation));
        }
        if (person.getDeathdate() != null) {
            String additionalInformation = "";
            additionalInformation = this.getLongName() + " died on "
                    + new SimpleDateFormat("dd/MM/yyyy").format(person.getDeathdate()) + ".";
            notificationList.add(new Notification(this, Notification.Type.DEATH, person.getDeathdate(), additionalInformation));
        }
        return notificationList;
    }
View Full Code Here


        DefaultMutableTreeNode node = (DefaultMutableTreeNode) notificationTree.getLastSelectedPathComponent();
        if (!node.isRoot()) {
            if (node == null || !node.isLeaf()) {
                showWarningMessage("Please select the notification to process.", processNotificationButton);
            } else {
                Notification notification = (Notification) node.getUserObject();
                NotificationDialog nd = new NotificationDialog(this.getFrame(), true, notification);
                nd.setLocationRelativeTo(this.getFrame());
                nd.setVisible(true);
                if (notification.isFlaggedOff()) {
                    removeNotificationFromTree(notification);
                    statusMessageLabel.setText("1 notification processed. You now have " + totalNotifications()
                            + " notification(s) to process.");
                }
            }
View Full Code Here

TOP

Related Classes of ke.go.moh.oec.reception.data.Notification

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.