main
Steve Nyemba 2 years ago
parent b4e7acc5db
commit b545ce1a3d

@ -1,53 +1,89 @@
{ {
"system":{ "system": {
"logo":"www/parser/_images/cog-red.png","context":"", "theme":"oss.css", "logo": "www/parser/_images/cog-red.png",
"app":{ "context": "",
"theme": "oss.css",
"debug":true,"port":8000}, "app": {
"version":0.6,"mode":"portal", "debug": true,
"source":{ "port": 8000
"id":"cloud", },
"auth":"nextcloud-auth.json", "version": 0.6,
"store":"/home/steve/git/sites/parser/store-auth.json" "mode": "portal",
}, "source": {
"routes":{ "id": "cloud",
"data-transport":{ "auth": "nextcloud-auth.json",
"menu":"tools", "store": "/home/steve/git/sites/parser/store-auth.json",
"path":"/home/steve/git/sites/data-transport/config.json" "key": "/home/steve/dev/data/qcms/parser.json"
},
"routes": {
"data-transport": {
"menu": "tools",
"path": "/home/steve/git/sites/data-transport/config.json"
},
"privacykit": {
"menu": "tools",
"path": "/home/steve/git/sites/privacykit/config.json"
} }
} }
},
"plugins": {
}, "store": ["init","plans","version"
"plugins":{ ],
"store":["init","plans"], "users": [
"users":["signup"] "signup"
}, ]
"layout":{ },
"header":{"title":"{x12} Parser :: Healthcare/IO","logo":true,"subtitle":"Open, Simple & Extensible - Powered by data-transport"}, "layout": {
"icons":[], "header": {
"root":"www/parser", "title": "{x12} Parser :: Healthcare/IO",
"index":"index.html", "logo": true,
"order":{ "subtitle": "Open, Simple & Extensible - Powered by data-transport"
"menu":["tools","resources","about"] },
}, "icons": [],
"overwrite":{ "root": "www/parser",
"license":{ "index": "index.html",
"title":"MIT License", "order": {
"text":"license", "menu": ["tools","tutorials", "about"
]
},
"overwrite": {
"1-parse":{
"text":"{12} Parsing", "title":"{x12} Parsing","type":"dialog","uri":"www/parser/tutorials/1-parse.md"
},
"license": {
"title": "MIT License",
"text": "license",
"type": "dialog",
"uri": "www/parser/about/license.md"
},
"source-code": {
"text": "Source Code",
"type": "redirect",
"url": "https://hiplab.mc.vanderbilt.edu/git/hiplab/parser.git"
},
"change-database":{
"title":"Change Database",
"text":"change database",
"type":"dialog", "type":"dialog",
"uri":"www/parser/about/license.md" "uri":"www/parser/tutorials/change-database.md"
}, },
"source-code":{ "embed-in-code":{
"text":"Source Code", "title":"embed in code","text":"{x12} Import Library","type":"dialog","uri":"www/parser/tutorials/embed-in-code.md"
"type":"redirect",
"url":"https://hiplab.mc.vanderbilt.edu/git/hiplab/parser.git"
}, },
"credit":{ "export-data":{"title":"Export Data","text":"Export Data","type":"dialog","uri":"www/parser/tutorials/export-data.md"},
"title":"{x12} Parser Credit", "credit": {
"type":"dialog","uri":"www/parser/about/credit.html" "title": "{x12} Parser Credit",
"type": "dialog",
"uri": "www/parser/about/credit.html"
} }
}, },
"footer":[{"text":"Health Information Privacy Laboratory"},{"text":"Powered By - QCMS"}] "footer": [
{
"text": "Health Information Privacy Laboratory"
},
{
"text": "Powered By - QCMS"
}
]
} }
} }

@ -3,6 +3,7 @@ import stripe
import json import json
import os import os
import pandas as pd import pandas as pd
import healthcareio
def copyright(**_args): def copyright(**_args):
return [store.__name__,store.__version__] return [store.__name__,store.__version__]
@ -23,9 +24,10 @@ def plans (**_args) :
""" """
This function will return plans associated with a product This function will return plans associated with a product
""" """
_config = _args['config']
if not store.isready() : if not store.isready() :
print (['Initializing Store']) print (['Initializing Store'])
init(**_args) init(config = _config)
_plans = store.get.plans('healthcareio') _plans = store.get.plans('healthcareio')
_df = {} _df = {}
@ -44,10 +46,13 @@ def plans (**_args) :
return _df.to_json() return _df.to_json()
def signup (**_args): def signup (**_args):
_email = _args['email'] _request = _args['request']
_name = None if 'name' in _args else _args['name'] _email = _request.headers['email']
_name = None if 'name' in _request.headers else _request.headers['name']
product = store.get.product('healthcareio') product = store.get.product('healthcareio')
# #
# If the user is already signed up # If the user is already signed up
customer = store.get.customer(_email) customer = store.get.customer(_email)
def version (**_args):
return str(healthcareio.meta.__version__)

@ -19,9 +19,11 @@ def signup(**_args):
""" """
This function creates or pulls a customer's key from the backend (stripe) This function creates or pulls a customer's key from the backend (stripe)
""" """
_config = _args['config']
_request= _args['request']
if not store.isready() : if not store.isready() :
__init__(**_args) __init__(config = _config)
_email = _args['email'] _email = _request.headers['email']
_customer = store.get.customer(_email) _customer = store.get.customer(_email)
_user = {} _user = {}
if not _customer : if not _customer :
@ -40,7 +42,6 @@ def signup(**_args):
_user['token'] = _customer['id'] _user['token'] = _customer['id']
return json.dumps(_user) return json.dumps(_user)
def upgrade (**_args): def upgrade (**_args):
pass pass

@ -0,0 +1,13 @@
"""
"""
import transport
_QUERY = {
"missing_elements":{
transport.providers.SQLITE3:"select count(*) counts, date, json_extract(data,'$.element') element, json_extract(data,'$.anchor') qualifier from logs where action = 'missing-plugin' group by element, qualifier ",
transport.providers.MONGODB:{"mongo":{"aggregate":"x12logs"}},
}
}
def query(**_args):
_request = _args['request']
Loading…
Cancel
Save