Skip to main content
Demographics
============

This is a Django App which provides a screen to view and edit
the Demographics record.

It is an example / proof of concept application.

There is a dependency on the django-form-admin package. This package
is used to provide a simple forms layer. This package requires the
django.contrib.admin package to be configured.

Installation
------------

Make sure you are in the correct virtualenv environment::

. python/bin/activate (or similar)

Configure pre-requisites::

pip install django-form-admin

Install the package::

pip install openapp_indivo_demographics

Register the packages.
Place these lines at the end of the settings.py file in the indivo_ui_server folder::

import os.path
import django.contrib
ADMIN_ROOT_DIR = os.path.dirname(django.contrib.__file__) + "/admin"
TEMPLATE_DIRS += ADMIN_ROOT_DIR + '/templates/',
INSTALLED_APPS += 'django.contrib.admin',
STATICFILES_DIRS += ADMIN_ROOT_DIR + '/static/',

import formadmin
FORMADMIN_ROOT_DIR = os.path.dirname(formadmin.__file__)
TEMPLATE_DIRS += FORMADMIN_ROOT_DIR + '/templates/',
INSTALLED_APPS += 'formadmin',

import openapp_indivo.demographics
DEMOGRAPHICS_ROOT_DIR = os.path.dirname(openapp_indivo.demographics.__file__)
TEMPLATE_DIRS += DEMOGRAPHICS_ROOT_DIR + '/templates/',
STATICFILES_DIRS += DEMOGRAPHICS_ROOT_DIR + '/static/',
INSTALLED_APPS += 'openapp_indivo.demographics',

MIDDLEWARE_CLASSES += 'openapp_indivo.demographics.middleware.GlobalRequestMiddleware',

Restart the server to make sure the configuration is correct.

You have to manually set up the application in the indivo_server
environment. It cannot detect it from the settings file.

Add these two files to the indivo_server environment.

indivo_server/registered_apps/user/openapp_indivo.demographics/credentials.json::

{
"consumer_key": "demographics@apps.openapp.ie",
"consumer_secret": "demographics"
}

indivo_server/registered_apps/user/openapp_indivo.demographics/manifest.json::

{
"name" : "Demographics",
"description" : "View and Edit the Demographics record.",
"author" : "Kevin Gill, OpenApp",
"id" : "demographics@apps.openapp.ie",
"version" : "0.1.0",
"smart_version": "0.0",

"mode" : "ui",
"scope": "record",
"has_ui": true,
"frameable": true,

"icon" : "/static/openapp_indivo/demographics/images/demographics.png",
"index": "/openapp_indivo/demographics/start_auth?record_id={record_id}&carenet_id={carenet_id}",
"oauth_callback_url": "/openapp_indivo/demographics/after_auth"
}

You have to notify indivo that there is a change to the apps configuration.
Run this command against the indivo_server manage.py::

python manage.py sync_apps


After this you should be able to add the application to a record.


Outstanding Issues
------------------

Where a record has no Demographics document, an error is produced. I don't know
whether records with Demographics documents are expected or the demo data is
incomplete.

Changelog
=========

1.0 - 22 Nov 2012
-----------------

* Initial release

1.0.1 - 22 Nov 2012
-----------------

* Fix problems with installing from pypi.
* Fix order of fields in the PUT document.

Metadata

Release files for openapp_indivo_demographics 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openapp_indivo_demographics 1.0.1
File Size Uploaded
openapp_indivo_demographics-1.0.1.tar.gz 13.2 kB Details

Release files / openapp_indivo_demographics-1.0.1.tar.gz

Download URL openapp_indivo_demographics-1.0.1.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7468089d041b845fe17f5d50e286bbcd6c58d682776a746df18115557f8086a9
BLAKE2b-256 checksum
How to use checksums
264fa4a075065c6b930da6dc8f8fd6a7e2fbd006bcab540597def6bbe797295f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page