Skip to content

Instantly share code, notes, and snippets.

View disusered's full-sized avatar

Carlos Rosquillas disusered

View GitHub Profile

Issues found interacting with new Rx endpoints

Can't fetch signature with certain fields missing

Only .patient.email is being validated. We need to validate other fields in the form, since not having these fields gives an error when fetching the signature with the minimal_rx query param. From my testing the following fields are required:

  • .patient.email
  • .medic.cedula_prof

Without these, the generated Rx give a 500 error when trying to fetch via patient landing's endpoint.

@disusered
disusered / patch.diff
Created November 17, 2023 22:24
Remove "Open Emails" from dashboard
diff --git a/apps/prx/graphs.py b/apps/prx/graphs.py
index 7e5b29b..8297d4f 100644
--- a/apps/prx/graphs.py
+++ b/apps/prx/graphs.py
@@ -736,10 +736,6 @@ def tracking_email(start_date, end_date, campaign='all'):
rxs_data = {'from_medics_ids': medics_ids_str, "only_count": True}
sent_rxs_data = {'from_medics_ids': medics_ids_str, "only_count": True, "field": ("sent", "=", True)}
- rxs_open_email_data = {
- 'from_medics_ids': medics_ids_str, "only_count": True,
import sample from 'lodash/sample'
import drop from 'lodash/drop'
export default {
data() {
const { name } = this.$whiteLabel.options.meta
return {
steps: [
{
/**
* Here we have a component with a useEffect hook. Even though we've told React
* that the hook should only fire when firstHookDependency or secondHookDependency change,
* React is still going to fire this hook on every render. Explain in a few sentences how you would rewrite
* firstHookDependency and secondHookDependency to ensure that the useEffect hook only fires
* when these values change.
* */
const Component = () => {
// Function is recreated on every render, useCallback memoizes the callback. Alternatively, based on the
// function's dependencies it may be hoisted outside the component
@disusered
disusered / config_loader.ex
Created June 7, 2019 17:17
Update ConfigLoader
defmodule Sphingi.ConfigLoader do
defp parse(value) when is_atom(value), do: value |> to_string
defp parse(value), do: value
def get(namespace, value, key \\ nil) do
if key do
parse(Application.get_env(namespace, value)[key])
else
parse(Application.get_env(namespace, value))
## Batch Create Assertion Duplicate
curl -X "POST" "http://localhost:4000/api/batch/assertions" \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Cookie: jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjYXJsb3NAYmFkZ2V0cmVlLmNvbSIsImlkIjoyfQ.yL0nNX_l3VtPjgZdVk7-1Q7TD4XF_IiVk2VgwhwoOqs; ueberauth_linkedin_state=INKFNIWeDa6TbzGP9aI/VA==' \
-d $'{
"data": [
{
"issuer_id": "4",
"user_email": "[email protected]",
"message": "Mensaje",
@disusered
disusered / error.json
Created December 7, 2018 17:23
error
{
"errors": [
{
"reason": "invalidQuery",
"location": "query",
"message": "Syntax error: Unexpected \"-\" at [1:25]"
}
],
"response": {
"kind": "bigquery#job",

Keybase proof

I hereby claim:

  • I am disusered on github.
  • I am disusered (https://keybase.io/disusered) on keybase.
  • I have a public key ASDpgD3vf6Ewt-zpBJ8oKvO-lYCM5Jci60gSmO_bZnY6kAo

To claim this, I am signing this object:

@disusered
disusered / profiler
Created July 13, 2015 05:06
Profiling Neovim startup
#!/bin/bash
iterations=10
# -----------------------------------------------------------------------------
# Create array of results
declare -a results
for i in $(seq 1 $iterations);
@disusered
disusered / dnsimple
Created November 11, 2013 00:20
Update DNSimple with local IP
#!/bin/bash
# JSON Parser
JSON=`curl -s -X GET http://jsonip.com/`
PROP='ip'
function jsonval {
temp=`echo $JSON | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $PROP`
echo ${temp##*|}
}