{"swagger":"2.0","info":{"version":"1.0.0","title":"3PEC API Set","description":"Informs HUN application developers in how to use 3PEC functionality"},"tags":[{"name":"In Design","description":"APIs that are being designed","externalDocs":{"description":"Find out more","url":"http://tbd.io"}},{"name":"Implemented","description":"APIs that have been implemented"}],"securityDefinitions":{"application":{"type":"oauth2","tokenUrl":"http://tbd.com/oauth/token","flow":"application","scopes":{"write":"allows modifying resources","read":"allows reading resources"}}},"security":[{"application":["read","write"]}],"paths":{"/ping":{"get":{"summary":"A PING command, to see if 3PEC is up","description":"An application level ping commmand","tags":["Implemented"],"responses":{"200":{"description":"OK, 3PEC is up","schema":{"type":"object","items":{"$ref":"#/definitions/PingResp"}}}}}},"/config":{"get":{"summary":"Configuration","description":"Retrieve the configuration object used by 3PEC","tags":["Implemented"],"responses":{"200":{"description":"OK, here is the configuration","schema":{"$ref":"#/definitions/ConfigObject"}}}}},"/Patient":{"post":{"tags":["Implemented"],"summary":"POST a FHIR Patient Resource to Create a HUN-ID","description":"This API creates a HUN ID for a patient, assuming the patient is not previously known to 3PEC","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/Patient"}}],"responses":{"200":{"description":"Patient already known to 3PEC"},"201":{"description":"Patient added to 3PE & HUN ID Created"},"400":{"description":"Malformed Request"},"401":{"description":"Unauthorized"},"412":{"description":"Multiple patients matching this request already known to 3PEC"},"500":{"description":"Internal 3PEC Error"}}}},"/Person":{"get":{"summary":"Get by Avaneer id","description":"Retrieve the person object used by 3PEC","tags":["Implemented"],"produces":["application/json"],"parameters":[{"in":"query","name":"avaneerId","required":true,"type":"string"}],"responses":{"200":{"description":"OK, here is the configuration","schema":{"$ref":"#/definitions/Person"}},"400":{"description":"Malformed Request"},"401":{"description":"Unauthorized"},"412":{"description":"Multiple patients matching this request already known to 3PEC"},"500":{"description":"Internal 3PEC Error"}}},"delete":{"summary":"disassociate members identity from Person resource","description":"disassociate members identity from Person resource","tags":["Implemented"],"produces":["application/json"],"parameters":[{"in":"query","name":"avaneerId","required":true,"type":"string"}],"responses":{"202":{"description":"OK, disassociated"},"400":{"description":"Malformed Request"},"401":{"description":"Unauthorized"},"412":{"description":"Multiple patients matching this request already known to 3PEC"},"500":{"description":"Internal 3PEC Error"}}}},"/Person/$match":{"post":{"summary":"fuzzy match of a person","description":"fuzzy match of a person","tags":["Implemented"],"produces":["application/json"],"parameters":[{"in":"body","name":"person","schema":{"$ref":"#/definitions/Person"}}],"responses":{"200":{"description":"OK, here is the configuration","schema":{"$ref":"#/definitions/PersonBundle"}},"400":{"description":"Malformed Request"},"401":{"description":"Unauthorized"},"412":{"description":"Multiple patients matching this request already known to 3PEC"},"500":{"description":"Internal 3PEC Error"}}}}},"definitions":{"PingResp":{"type":"object","properties":{"message":{"type":"string"}}},"ConfigObject":{"type":"object","properties":{"FhirServer":{"type":"object","properties":{"Address":{"type":"string"}}},"FhirSearch":{"type":"object","properties":{"Host":{"type":"string"},"Port":{"type":"string"}}}}},"HumanName":{"type":"object","properties":{"use":{"type":"string"},"text":{"type":"string"},"family":{"type":"string"},"given":{"type":"array","items":{"type":"string"}},"prefix":{"type":"array","items":{"type":"string"}},"suffix":{"type":"array","items":{"type":"string"}},"period":{"$ref":"#/definitions/Period"}}},"Period":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}}},"Coding":{"type":"object","properties":{"system":{"type":"string"},"version":{"type":"string"},"code":{"type":"string"},"display":{"type":"string"},"userSelected":{"type":"boolean"}}},"CodeableConcept":{"type":"object","properties":{"coding":{"type":"array","items":{"$ref":"#/definitions/Coding"}},"text":{"type":"string"}}},"Identifier":{"type":"object","properties":{"use":{"type":"string"},"type":{"$ref":"#/definitions/CodeableConcept"},"system":{"type":"string","description":"a uri"},"value":{"type":"string"},"period":{"type":"array","items":{"$ref":"#/definitions/Period"}}}},"Reference":{"type":"object","properties":{"reference":{"type":"string"},"type":{"type":"string"},"identifier":{"$ref":"#/definitions/Identifier"},"display":{"type":"string"}}},"ContactPoint":{"type":"object","properties":{"system":{"type":"string"},"value":{"type":"string"},"use":{"type":"string"},"rank":{"type":"integer"},"period":{"$ref":"#/definitions/Period"}}},"Address":{"type":"object","properties":{"use":{"type":"string"},"type":{"type":"string"},"text":{"type":"string"},"line":{"type":"array","items":{"type":"string"}},"city":{"type":"string"},"district":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"},"period":{"$ref":"#/definitions/Period"}}},"Signature":{"type":"object","properties":{"type":{"type":"array","items":{"type":"string"}},"when":{"type":"string"},"who":{"$ref":"#/definitions/Reference"},"OnBehalfOf":{"$ref":"#/definitions/Reference"},"targetFormat":{"type":"string"},"signFormat":{"type":"string"},"data":{"type":"string"}}},"Attachment":{"type":"object","properties":{"contentType":{"type":"string"},"language":{"type":"string"},"data":{"type":"string"},"url":{"type":"string"},"size":{"type":"integer"},"hash":{"type":"string"},"title":{"type":"string"},"creation":{"type":"string"}}},"Person":{"type":"object","properties":{"resourceType":{"type":"string","default":"Person"},"identifier":{"type":"array","items":{"$ref":"#/definitions/Identifier"}},"name":{"type":"array","items":{"$ref":"#/definitions/HumanName"}},"telecom":{"type":"array","items":{"$ref":"#/definitions/ContactPoint"}},"gender":{"type":"string"},"birthDate":{"type":"string"},"address":{"type":"array","items":{"$ref":"#/definitions/Address"}},"photo":{"type":"array","items":{"$ref":"#/definitions/Attachment"}},"managingOrganization":{"$ref":"#/definitions/Reference"},"active":{"type":"boolean"},"link":{"type":"array","items":{"type":"object","properties":{"target":{"$ref":"#/definitions/Reference"},"assurance":{"type":"string"}}}}}},"BundleEntry":{"type":"object","properties":{"link":null,"fullUrl":{"type":"string"},"resource":{"$ref":"$/definitions/Person"},"search":{"type":"object","properties":{"mode":{"type":"string"},"score":{"type":"number"}}},"request":null,"response":null}},"Patient":{"type":"object","properties":{"identifier":{"type":"array","items":{"$ref":"#/definitions/Identifier"}}}},"PersonBundle":{"type":"object","properties":{"identifier":{"$ref":"#/definitions/Identifier"},"type":{"type":"string"},"timestamp":{"type":"string"},"total":{"type":"integer"},"link":{"type":"object","properties":{"relation":{"type":"string"},"url":{"type":"string"}}},"entry":{"type":"array","items":{"$ref":"#/definitions/BundleEntry"}},"signature":{"$ref":"#/definitions/Signature"}}}},"host":"virtserver.swaggerhub.com","schemes":["https"],"basePath":"/fhirBlocks/3PEC/1.0.0"}