class ClientProcessor {

    public Boolean processEvent(JSONObject event, JSONObject clientClassificationJson) throws
            Exception {

        try {
            String baseEntityId = event.getString(baseEntityIdJSONKey);

            if (event.has("creator")) {
                Timber.i("EVENT from openmrs");
            }

            // For data integrity check if a client exists, if not pull one from cloudant and
            // insert in drishti sqlite db
            JSONObject client = getClient(baseEntityId);
            if (isNullOrEmptyJSONObject(client)) {
                return false;
            }

            // Check if child is deceased and skip
            if (client.has("deathdate") && !client.getString("deathdate").isEmpty()) {
                return false;
            }

            // Get the client type classification
            JSONArray clientClasses = clientClassificationJson
                    .getJSONArray("case_classification_rules");
            if (isNullOrEmptyJSONArray(clientClasses)) {

                return false;
            }

            for (int i = 0; i < clientClasses.length(); i++) {
                JSONObject clientClass = clientClasses.getJSONObject(i);
                processClientClass(clientClass, event, client);
            }

            // Incase the details have not been updated
            boolean updated = event.has(detailsUpdated) && event.getBoolean(detailsUpdated);
            if (!updated) {
                updateClientDetailsTable(event, client);
            }

            return true;
        } catch (Exception e) {
            Timber.e(e);

            return null;
        }
    }

    public  ClientProcessor(Context context);

}