Beispiel #1
0
def updateProfile(data):
	from templates.pages.profile import update_profile_solr, make_mv_entry,send_mobile_v_code

	data = json.loads(data)
	res = update_profile_solr(json.dumps(data))

	if res.get('rtcode') == 100:
		mob_code = make_mv_entry(res.get('mob_no'), data.get('entityid'))
		if mob_code:
			send_mobile_v_code(res.get('mob_no'),data.get('entityid'),mob_code)
		return res
	else: return res
Beispiel #2
0
def updateProfile(data):
	from templates.pages.profile import update_profile_solr, make_mv_entry,send_mobile_v_code

	data = json.loads(data)
	res = update_profile_solr(json.dumps(data))

	if res.get('rtcode') == 100:
		mob_code = make_mv_entry(res.get('mob_no'), data.get('entityid'))
		if mob_code:
			send_mobile_v_code(res.get('mob_no'),data.get('entityid'),mob_code)
		return res
	else: return res
Beispiel #3
0
def createLinkedPHR(data):
	from templates.pages.linked_phr import create_linkedphr
	from templates.pages.profile import make_mv_entry, send_mobile_v_code
	data = json.loads(data)
	res = create_linkedphr(json.dumps(data))

	if res.get('returncode') == 122 and data.get('mobile'):
		mob_code = make_mv_entry(data.get('mobile'), res.get('entityid'))
		if mob_code:
			send_mobile_v_code(data.get('mobile'), data.get('entityid'), mob_code)


	return {
		"returncode": res.get('returncode'),
		"actualdata": json.loads(res.get('actualdata')),
		"entityid": res.get('entityid'),
		"message_summary": res.get('message_summary')
	}
Beispiel #4
0
def createLinkedPHR(data):
	from templates.pages.linked_phr import create_linkedphr
	from templates.pages.profile import make_mv_entry, send_mobile_v_code
	data = json.loads(data)
	res = create_linkedphr(json.dumps(data))

	if res.get('returncode') == 122 and data.get('mobile'):
		mob_code = make_mv_entry(data.get('mobile'), res.get('entityid'))
		if mob_code:
			send_mobile_v_code(data.get('mobile'), data.get('entityid'), mob_code)


	return {
		"returncode": res.get('returncode'),
		"actualdata": json.loads(res.get('actualdata')),
		"entityid": res.get('entityid'),
		"message_summary": res.get('message_summary')
	}