Skip to content

Instantly share code, notes, and snippets.

View AnalogJ's full-sized avatar
🔥
Why is everything always broken?

Jason Kulatunga AnalogJ

🔥
Why is everything always broken?
View GitHub Profile
import json
import csv
import os
# Define the input files and output file
input_files = [f'pitchbook-{i}.json' for i in range(1, 12)]
output_file = 'investors_data.csv'
# Define the headers for the CSV file
headers = [
{
"org_connection_id": "16e39045-5382-42a0-b93d-b75268984c1f",
"resource_types": [
"AllergyIntolerance",
"CarePlan",
"CareTeam",
"Condition",
"Device",
"DiagnosticReport",
"DocumentReference",
@AnalogJ
AnalogJ / 2024-04-03-aa511b61-acf8-4f58-a5d7-a3f16cc8b5e4.jsonl
Last active September 12, 2024 08:27
An example EHI Export file in JSONL format. It was previously generated via the Fasten Connect API and contains medical records from the Epic Sandbox in FHIR format.
{"id":"erXuFYUfucBZaryVksYEcMg3","extension":[{"url":"http://open.epic.com/FHIR/StructureDefinition/extension/legal-sex","valueCodeableConcept":{"coding":[{"system":"urn:oid:1.2.840.114350.1.13.0.1.7.10.698084.130.657370.19999000","code":"female","display":"female"}]}},{"extension":[{"url":"ombCategory","valueCoding":{"system":"urn:oid:2.16.840.1.113883.6.238","code":"2131-1","display":"Other Race"}},{"url":"text","valueString":"Other"}],"url":"http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"},{"extension":[{"url":"text","valueString":"Unknown"}],"url":"http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"}],"identifier":[{"use":"usual","type":{"text":"EPIC"},"system":"urn:oid:1.2.840.114350.1.13.0.1.7.5.737384.0","value":"E4007"},{"use":"usual","type":{"text":"EXTERNAL"},"system":"urn:oid:1.2.840.114350.1.13.0.1.7.2.698084","value":"Z6129"},{"use":"usual","type":{"text":"FHIR"},"system":"http://open.epic.com/FHIR/StructureDefinition/patient-dstu2-fhir-id","value":"TnOZ.elPXC6zcBNFMc
https://accounts.flatiron.com/connect/authorize/callback?redirect_uri=https%3A%2F%2Flighthouse.fastenhealth.com%2Fsandbox%2Fcallback%2Fflatiron&response_type=code&response_mode=query&state=630e83a8-cccb-4cb0-9614-2617980b7b58&client_id=fasten-health.fhir-standalone-confidential&scope=fhirUser%20openid%20offline_access%20launch%2Fpatient%20patient%2FAllergyIntolerance.read%20patient%2FCarePlan.read%20patient%2FCareTeam.read%20patient%2FCondition.read%20patient%2FDevice.read%20patient%2FDiagnosticReport.read%20patient%2FDocumentReference.read%20patient%2FEncounter.read%20patient%2FGoal.read%20patient%2FImmunization.read%20patient%2FDevice.read%20patient%2FObservation.read%20patient%2FLocation.read%20patient%2FMedication.read%20patient%2FMedicationRequest.read%20patient%2FOrganization.read%20patient%2FPatient.read%20patient%2FPractitioner.read%20patient%2FProcedure.read%20patient%2FProvenance.read&aud=https%3A%2F%2Ffhir.prod.flatiron.io%2Ffhir&code_challenge=0F7oGU4eMSQFrZ5DHyaMusJZ8tSmPuoHj9filwN-1Ek&code_chall
@AnalogJ
AnalogJ / config.yaml
Created February 28, 2024 00:08
Fasten Health Debug + Unsafe Endpoints config file
######################################################################
# Version
#
# version specifies the version of this configuration file schema, not
# the fasten binary. There is only 1 version available at the moment
version: 1
web:
allow_unsafe_endpoints: true
listen:
@AnalogJ
AnalogJ / complex-patient-source-sink.md
Last active May 29, 2023 05:12
DevDays - Answering Patient Questions using Graph Theory - Diagrams
graph LR;
  Patient --> Condition_A;
  Patient --> Condition_B;

  Condition_A --> Encounter_A;
  Encounter_A --> Location_A;
  Encounter_A --> Observation_A;
  Encounter_A --> Practitioner_A;
  Encounter_A --> DiagnosticReport_A;
@AnalogJ
AnalogJ / fastenhealth-cla.md
Created November 7, 2022 05:08
Fasten Health, Inc CLA

Fasten Health Individual Contributor License Agreement

In order to clarify the intellectual property license granted with Contributions from any person or entity, Fasten Health, Inc ("Fasten Health") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Fasten Health; it does not change your rights to use your own Contributions for any other purpose.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Fasten Health. Except for the license granted herein to Fasten Health and recipients of software distributed by Fasten Health, You reserve all right, title, and interest in and to Your Contributions.

Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Fasten Health. For legal

@AnalogJ
AnalogJ / personal-cla.md
Last active September 29, 2022 03:10
Personal CLA

Jason Kulatunga Individual Contributor License Agreement

In order to clarify the intellectual property license granted with Contributions from any person or entity, Jason Kulatunga must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Jason Kulatunga; it does not change your rights to use your own Contributions for any other purpose.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Jason Kulatunga. Except for the license granted herein to Jason Kulatunga and recipients of software distributed by Jason Kulatunga, You reserve all right, title, and interest in and to Your Contributions.

Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Jason Kulatunga. For legal entities

@AnalogJ
AnalogJ / download_opds.py
Created August 29, 2017 01:54
download all books in OPDS catalog.
import urllib2
import os
import urllib, urlparse
import xml.etree.cElementTree as et
e = et.ElementTree(file=urllib2.urlopen('https://standardebooks.org/opds/all')).getroot()
print(e)
print("parsing")
for atype in e.iter('{http://www.w3.org/2005/Atom}link'):
@AnalogJ
AnalogJ / GIF-Screencast-OSX.md
Created August 25, 2017 04:13 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: