Skip to content

Instantly share code, notes, and snippets.

@zkkmin
Created Nov 22, 2020
Embed
What would you like to do?
temp
{
"openapi": "1.0.0",
"info": {
"title": "Doctor discovery service API",
"description": "Doctor discovery service API.\n",
"contact": {
"email": "support@docdoc.com"
},
"version": "v.1.0.0"
},
"servers": [
{
"url": "https://api-staging.docdoc.com",
"description": "Staging Server"
}
],
"tags": [
{
"name": "Medical terms",
"description": "Specialties, procedures and conditions"
},
{
"name": "Report",
"description": "Doctor discovery report"
}
],
"paths": {
"/v1/specialties": {
"get": {
"tags": [
"Medical terms"
],
"summary": "Get the list of medical specialties in DocDoc's ontology to display for consumer selection.",
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": true,
"style": "simple",
"explode": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Specialty"
}
}
}
}
}
}
}
},
"/v1/procedures": {
"get": {
"tags": [
"Medical terms"
],
"summary": "Get the list of medical procedures in DocDoc's ontology to display for consumer selection..",
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": true,
"style": "simple",
"explode": false,
"schema": {
"type": "string"
}
},
{
"name": "specialty_npi_code",
"in": "query",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Procedure"
}
}
}
}
}
}
}
},
"/v1/conditions": {
"get": {
"tags": [
"Medical terms"
],
"summary": "Get the list of medical conditions in DocDoc's ontology to display for consumer selection..",
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": true,
"style": "simple",
"explode": false,
"schema": {
"type": "string"
}
},
{
"name": "specialty_npi_code",
"in": "query",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Condition"
}
}
}
}
}
}
}
},
"/v1/partial-discoverable-providers": {
"get": {
"tags": [
"Report"
],
"summary": "Get a partial list of discoverable providers to allow consumers to preview doctors that may be relevant to their medical situation.",
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": true,
"style": "simple",
"explode": false,
"schema": {
"type": "string"
}
},
{
"name": "specialty_npi_code",
"in": "query",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
},
{
"name": "procedure_snomed_code",
"in": "query",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
},
{
"name": "condition_snomed_code",
"in": "query",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
},
{
"name": "date-of-birth",
"in": "query",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"format": "date"
}
},
{
"name": "physician_gender",
"in": "query",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"enum": [
"FEMALE",
"MALE"
]
}
},
{
"name": "physician_language_language_code",
"in": "query",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"enum": [
"ZSH",
"EN"
]
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PartialResult"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
}
},
"/v1/doctor-discovery-report": {
"post": {
"tags": [
"Report"
],
"summary": "Generate doctor discovery report for consumer based on their medical situation and preferences. This can be automated via the API if the consumer is clear on their medical needs, or delivered after a conversation with a physician case manager if the consumer requires assistance.",
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": true,
"style": "simple",
"explode": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReportRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"report_id": {
"type": "string",
"format": "UUID"
}
}
}
}
}
}
}
}
},
"/v1/generated-report-pdf/{report_id}": {
"get": {
"tags": [
"Report"
],
"summary": "Download the full doctor discovery report pdf for the consumer.",
"parameters": [
{
"name": "x-api-key",
"in": "header",
"required": true,
"style": "simple",
"explode": false,
"schema": {
"type": "string"
}
},
{
"name": "report_id",
"in": "path",
"required": true,
"style": "simple",
"explode": false,
"schema": {
"type": "string",
"format": "UUID"
}
}
],
"responses": {
"200": {
"description": "PDF data",
"content": {
"application/pdf": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Doctor": {
"type": "object",
"properties": {
"doctor_name": {
"type": "string"
},
"specialty_name": {
"type": "string"
},
"country_name": {
"type": "string"
},
"outcome_score": {
"type": "integer"
},
"price_dollar_sign_count": {
"type": "integer"
},
"experience_score": {
"type": "integer"
}
}
},
"Country": {
"type": "object",
"properties": {
"country_code": {
"type": "string",
"enum": [
"HK",
"SG",
"MY",
"ID"
]
},
"name": {
"type": "string"
}
}
},
"Specialty": {
"type": "object",
"properties": {
"npi_code": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"Procedure": {
"type": "object",
"properties": {
"snomed_code": {
"type": "string"
},
"common_name": {
"type": "string"
}
}
},
"Condition": {
"type": "object",
"properties": {
"snomed_code": {
"type": "string"
},
"common_name": {
"type": "string"
}
}
},
"PartialResult": {
"type": "object",
"properties": {
"countries": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Country"
}
},
"discoverable_doctors_count": {
"type": "integer"
},
"doctors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Doctor"
}
}
}
},
"ReportRequest": {
"type": "object",
"properties": {
"patient_information": {
"type": "object",
"properties": {
"family_name": {
"type": "string"
},
"given_name": {
"type": "string"
},
"gender": {
"type": "string",
"enum": [
"MALE",
"FEMALE"
]
},
"date_of_birth": {
"type": "string",
"format": "date"
}
}
},
"medical_information": {
"type": "object",
"properties": {
"specialty_npi_code": {
"type": "string"
},
"procedure_snomed_code": {
"type": "string"
},
"condition_snomed_code": {
"type": "string"
},
"pre_existing_condition_snomed_code": {
"type": "string"
},
"physician_gender": {
"type": "string",
"enum": [
"FEMALE",
"MALE"
]
},
"physician_language_language_code": {
"type": "string",
"enum": [
"ZHS"
]
},
"physician_country_country_code": {
"type": "string",
"enum": [
"HK",
"SG",
"MY"
]
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment