Obtener una lista de pacientes que fueron recetados con un medicamento especifico
Es necesario contar conun token con los permisos necesarios.
curl --location 'https://www.prescrypto.com/api/v2/prixz/leads/' \
| from Crypto.PublicKey import RSA # nosec B413 | |
| from Crypto.Hash import SHA256 # nosec B413 | |
| # Read FIEL.cer | |
| def read_fiel_cer(directory_file): | |
| try: | |
| public_key = None | |
| with open(directory_file + '.cer', 'rb') as f: | |
| public_key = RSA.import_key(f.read()) | |
| except Exception as e: |
| <html> | |
| <!-- FROM WAYBACK MACHINE --> | |
| <!-- wbinfo.url = "http://www.geocities.com:80/yosemite/gorge/6715/"; --> | |
| <!-- wbinfo.timestamp = "20010825233744"; --> | |
| <!-- wbinfo.request_ts = "20010825233744"; --> | |
| <title>Untitled Document</title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| using System; | |
| using RestSharp; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| var client = new RestClient("https://integration.prescrypto.com/api/v2/medics/"); | |
| client.Timeout = -1; | |
| var request = new RestRequest(Method.GET); |
{
// Faltantes Opcionales (Esto es obligatorio si el producto es un Medicamento)
"description" : "", // Descripcion adicional del medicamento
"measure_units": "" // Son las medidas de los ingredientes, por ejemplo "MCG", "MC", "ML"
"molecule": "[]" // Ingredientes del producto si es que tiene "['neomicina 250 MG', 'acetilsalicilico 500 mg']"
// Faltantes Obligatorio
"image_url" : "" // Esto debe ser una url único de la imagen, por ejemplo: "https://totalmedic.com.mx/pub/media/catalog/product/cache/image/1000x1320/249a04e11078a485979b671cc312a5a7/m/u/mu_equerasencilladeneopreno-5.jpg",
// DATA OK - esto no requiere cambios
"package_desc" : "Muñequera Sencilla de Neopreno", // NOMBRE
| -#!/bin/sh | |
| -# This is legacy code | |
| -# Latex Install, the prescript way! | |
| -echo "Installing wget" | |
| -sudo apt-get install -y wget | |
| - | |
| -echo "*******************************************" | |
| -echo "Installing Latex 2016 " | |
| -echo "*******************************************" | |
| -cd /vagrant/config |
| <!-- This is the style --> | |
| <style type="text/css">.ribbon { | |
| background-color: #a00; | |
| overflow: hidden; | |
| white-space: nowrap; | |
| /* top left corner */ | |
| position: absolute; | |
| left: -50px; | |
| top: 40px; | |
| /* 45 deg ccw rotation */ |
| # this will be a view accessed /apiauthview/?token=yourapitoken?redirect_url=/my_redirect_url/ | |
| # You need django rest API extended users enabled for this | |
| # For higher security, these tokens should be renewed each time a new request is made | |
| from rest_framework.authentication import TokenAuthentication | |
| # Authenticate a user with API Token | |
| class APITokenAutoLogin(View): | |
| def auth(self, request, *args, **kwargs): | |
| # GET |
| # Get Postgres | |
| sudo apt-get update | |
| sudo apt-get install libpq-dev postgresql postgresql-contrib | |
| Add postgres library to PATH (it's a good idea to put it in your .profile ) | |
| PATH=$PATH:/usr/lib/postgresql/9.1/bin | |
| export PATH |