Skip to content

Latest commit

 

History

History
363 lines (266 loc) · 8.22 KB

README.md

File metadata and controls

363 lines (266 loc) · 8.22 KB

Get Dental State


Returns json data about a single dental state resource. A dental state resource records a tooth, a corresponding CDT code, and its state (treated | untreated), along with comments and the id of the patient and clinic for which this data corresponds. An altcode field is used in case there is no matching cdt code in the system for the condition or treatment done.

  • URL

    /tscharts/v1/dentalstate/id

  • Method:

    GET

  • URL Params

    None

  • Data Params

    None

  • Success Response:

    • Code: 200
      Content:

    Response is a JSON object with the following fields:

    "id" : id
    "clinic" : id
    "patient" : id
    "tooth" : integer tooth number (0 if not related to a specific tooth)
    "location" : top | bottom
    "code" : id
    "username" : string
    "state" : missing | treated | untreated | none | other
    "surface" : csv consisting of one or more of the following: buccal | lingual | mesial | occlusal | labial | incisal | distal | none | other
    "time" : last modified datetime string for record
    "comment" : text

  • Error Response:

    • Code: 404 NOT FOUND
  • Example:

GET /tscharts/v1/dentalstate/2/ HTTP/1.1
Host: localhost
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.24.0
Content-Type: application/json
Authorization: Token adf8e350d1c01f22d2ea5d70f2599b40160fc473
Content-Length: 2

{}HTTP/1.1 200 OK
Date: Wed, 04 Nov 2020 02:28:46 GMT
Server: Apache/2.4.18 (Ubuntu)
Vary: Accept
X-Frame-Options: SAMEORIGIN
Allow: GET, POST, PUT, DELETE, HEAD, OPTIONS
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/json

88
{"username":"username","comment":"q","code":1,"patient":1,"surface":"buccal","state":"other","tooth":15,"location": "top", "clinic":1,"time":"2020-11-03T18:28:46.905","id":2}
0

Get Multiple Dental States

Returns data for all matching dental state resources.

  • URL

    /tscharts/v1/dentalstate/

  • Method:

    GET

  • URL Params

    Required:

    One or more of the following are used to filter the results.

"clinic" : id
"patient" : id
"tooth" : integer tooth number (0 if not related to a specific tooth)
"location" : top | bottom
"code" : id
"state" : one of the following: missing | treated | untreated | none | other
"surface" : one of the following: buccal | lingual | mesial | occlusal | labial | incisal | distal | none | other
"time" : last modified datetime string for record
"username" : text string
"comment" : text

  • Data Params

    None

  • Success Response:

    • Code: 200
      Content:

    "id" : id
    "clinic" : id
    "patient" : id
    "tooth" : integer tooth number (0 if not related to a specific tooth)
    "location" : top | bottom
    "code" : id
    "state" : missing | treated | untreated | none | other
    "surface" : csv consisting of one or more of the following: buccal | lingual | mesial | occlusal | labial | incisal | distal | none | other
    "time" : last modified datetime string for record
    "username" : text string
    "comment" : text

  • Error Response:

    • Code: 400 BAD REQUEST
    • Code: 403 NOT FOUND
    • Code: 500 SERVER ERROR
  • Example:

GET /tscharts/v1/dentalstate/?tooth=15 HTTP/1.1
Host: localhost
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.24.0
Content-Type: application/json
Authorization: Token adf8e350d1c01f22d2ea5d70f2599b40160fc473
Content-Length: 2

{}HTTP/1.1 200 OK
Date: Wed, 04 Nov 2020 02:28:47 GMT
Server: Apache/2.4.18 (Ubuntu)
Vary: Accept
X-Frame-Options: SAMEORIGIN
Allow: GET, POST, PUT, DELETE, HEAD, OPTIONS
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/json

8e
[{"username":"username","comment":"9","code":1,"patient":1,"surface": "buccal,labial","state":"untreated","location": "top", "tooth":15,"clinic":1,"time":"2020-11-03T18:28:47.081","id":9}]
0

Create a Dental State

Create a dental state resource for a patient at a specific clinic.

  • URL

    /tscharts/v1/dentalstate/

  • Method:

    POST

  • URL Params

    None

  • Data Params

    Required:

    "clinic" : id
    "patient" : id
    "tooth" : integer tooth number (0 if not related to a specific tooth)
    "location" : top | bottom
    "username" : string
    "code" : id
    "state" : missing | treated | untreated | none | other
    "surface" : csv consisting of one or more of the following: buccal | lingual | mesial | occlusal | labial | incisal | distal | none | other
    "comment" : text

    Optional:

    None

  • Success Response:

    • Code: 200
      Content: { "id" : id }
  • Error Response:

    • Code: 400 BAD REQUEST
    • Code: 404 NOT FOUND
    • Code: 500 SERVER ERROR
  • Example:

POST /tscharts/v1/dentalstate/ HTTP/1.1
Host: localhost
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.24.0
Content-Type: application/json
Authorization: Token adf8e350d1c01f22d2ea5d70f2599b40160fc473
Content-Length: 112

{"username": "Gomez", "comment": "z", "code": 1, "patient": 1, "clinic": 1, "location": "top", "tooth": -931, "state": "untreated", "surface": "occlusal, labial"}HTTP/1.1 200 OK
Date: Wed, 04 Nov 2020 02:28:46 GMT
Server: Apache/2.4.18 (Ubuntu)
Vary: Accept
X-Frame-Options: SAMEORIGIN
Allow: GET, POST, PUT, DELETE, HEAD, OPTIONS
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/json

8
{"id":1}
0

Update a Dental State

Update a dental state instance

  • URL

    /tscharts/v1/dentalstate/id

  • Method:

    PUT

  • URL Params

    None

  • Data Params

    Required:

    One or more of the following field/value pairs

    "tooth" : integer tooth number (0 if not related to a specific tooth)
    "location" : top | bottom
    "code" : id
    "username" : string
    "state" : missing | treated | untreated | none | other
    "surface" : csv consisting of one or more of the following: buccal | lingual | mesial | occlusal | labial | incisal | distal | none | other
    "comment" : text

  • Success Response:

    • Code: 200
  • Error Response:

    • Code: 400 BAD REQUEST
    • Code: 404 NOT FOUND
    • Code: 500 SERVER ERROR
  • Example:

PUT /tscharts/v1/dentalstate/30/ HTTP/1.1
Host: localhost
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.24.0
Content-Type: application/json
Authorization: Token adf8e350d1c01f22d2ea5d70f2599b40160fc473
Content-Length: 74

{"username": "username", "comment": "x", "state": "treated", "tooth": 980}HTTP/1.1 200 OK
Date: Wed, 04 Nov 2020 02:28:48 GMT
Server: Apache/2.4.18 (Ubuntu)
Vary: Accept
X-Frame-Options: SAMEORIGIN
Allow: GET, POST, PUT, DELETE, HEAD, OPTIONS
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/json

2
{}
0

Delete a Dental State

Delete a dental state resource. Use is not recommended except for unit test applications.

  • URL

    /tscharts/v1/dentalstate/id

  • Method:

    DELETE

  • URL Params

    None

  • Data Params

    None

  • Success Response:

    • Code: 200
      Content: None
  • Error Response:

    • Code: 404 NOT FOUND
  • Example:

DELETE /tscharts/v1/dentalstate/1/ HTTP/1.1
Host: localhost
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.24.0
Content-Type: application/json
Authorization: Token adf8e350d1c01f22d2ea5d70f2599b40160fc473
Content-Length: 2

{}HTTP/1.1 200 OK
Date: Wed, 04 Nov 2020 02:28:46 GMT
Server: Apache/2.4.18 (Ubuntu)
Vary: Accept
X-Frame-Options: SAMEORIGIN
Allow: GET, POST, PUT, DELETE, HEAD, OPTIONS
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/json

2
{}
0