"หมอไว" Services for mental disorder (Depression) prevention and medical care.
Slide: https://docs.google.com/presentation/d/1BZIsB1y6jIJ1eJHjpqhmk_XVLO7OzJEHKhPe7wGumFA/edit?usp=sharing
-
- มีที่มาจากการศึกษางานวิจัยโรคซึมเศร้า, การปรึกษาแพทย์ และ นำมาทำเป็นแบบทดสอบโรคซึมเศร้าเพื่อประเมิณอาการโรคซึมเศร้าและประเภทของโรคซึมเศร้าที่เป็น
-
URL :
test/questions
Method :GET
Response Code :200
Example response :
[
{
"questionID": 1,
"questionTitle": "รู้สึกซึม เศร้า หงุดหงิด หรือสิ้นหวัง",
"choices": [
{
"choiceID": 0,
"choiceTitle": "ไม่มีเลย",
"choiceValue": 0
},
{
"choiceID": 1,
"choiceTitle": "มีบางวัน",
"choiceValue": 1
},
{
"choiceID": 2,
"choiceTitle": "มีมากกว่า 7 วัน",
"choiceValue": 2
},
{
"choiceID": 3,
"choiceTitle": "มีแทบทุกวัน",
"choiceValue": 3
}
]
},
...
{
"questionID": 9,
"questionTitle": "คิดว่าถ้าตายไปเสียจะดีกว่า หรือคิดจะทำร้ายตัวเองด้วยวิธีใดวิธีหนึ่ง",
"choices": [
{
"choiceID": 0,
"choiceTitle": "ไม่มีเลย",
"choiceValue": 0
},
{
"choiceID": 1,
"choiceTitle": "มีบางวัน",
"choiceValue": 1
},
{
"choiceID": 2,
"choiceTitle": "มีมากกว่า 7 วัน",
"choiceValue": 2
},
{
"choiceID": 3,
"choiceTitle": "มีแทบทุกวัน",
"choiceValue": 3
}
]
}
]
-
URL :
test/questions/{id}
Method :GET
Response Code :200
Example response :
{
"questionID": 1,
"questionTitle": "รู้สึกซึม เศร้า หงุดหงิด หรือสิ้นหวัง",
"choices": [
{
"choiceID": 0,
"choiceTitle": "ไม่มีเลย",
"choiceValue": 0
},
{
"choiceID": 1,
"choiceTitle": "มีบางวัน",
"choiceValue": 1
},
{
"choiceID": 2,
"choiceTitle": "มีมากกว่า 7 วัน",
"choiceValue": 2
},
{
"choiceID": 3,
"choiceTitle": "มีแทบทุกวัน",
"choiceValue": 3
}
]
}
-
URL :
test/interpretation
Method :POST
Response Code :200
Example body :
{
"answers": [
{
"questionID": 1,
"selectedChoice": 1
},
{
"questionID": 2,
"selectedChoice": 1
},
{
"questionID": 3,
"selectedChoice": 1
},
{
"questionID": 4,
"selectedChoice": 1
},
{
"questionID": 5,
"selectedChoice": 1
},
{
"questionID": 6,
"selectedChoice": 1
},
{
"questionID": 7,
"selectedChoice": 1
},
{
"questionID": 8,
"selectedChoice": 1
},
{
"questionID": 9,
"selectedChoice": 1
}
]
}
Example response :
{
"totalScore": 9,
"depressionSeverity": "มีภาวะซึมเศร้าเล็กน้อย"
}
-
Get authentication token
POST
auth/oauth/tokenRequest
Authorize Basic username : fooClientId password : secret
URL Parameters grant_type : password username : <username> password: <password> scope: read write
Response
{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1Nzc0ODAxNjksInVzZXJfbmFtZSI6InBob25nc2F0aG9ybiIsImF1dGhvcml0aWVzIjpbIlJPTEVfVVNFUiJdLCJqdGkiOiIwZWIzODM3Yi03ODZkLTQ0NjUtOTY2Ni1lYWFlNjE5MTM2NTkiLCJjbGllbnRfaWQiOiJmb29DbGllbnRJZCIsInNjb3BlIjpbInJlYWQiXX0.q-OpfpNeSaeedB8QRvp8bCDXMDc4uwIfDj9GyGEugBk", "token_type": "bearer", "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJwaG9uZ3NhdGhvcm4iLCJzY29wZSI6WyJyZWFkIl0sImF0aSI6IjBlYjM4MzdiLTc4NmQtNDQ2NS05NjY2LWVhYWU2MTkxMzY1OSIsImV4cCI6MTU3NzU2NjU2OSwiYXV0aG9yaXRpZXMiOlsiUk9MRV9VU0VSIl0sImp0aSI6ImUwMDA4YzQ1LTNkZTMtNDJhZS1hOWZmLTAyNTlhN2VkODk0YSIsImNsaWVudF9pZCI6ImZvb0NsaWVudElkIn0.pDbeYc_P1MKmr3vUJBx087fMSsoBp_y2fxnTq018q8c", "expires_in": 2561746, "scope": "read", "jti": "0eb3837b-786d-4465-9666-eaae61913659" }\
-
Check authentication token
GET
auth/oauth/check_tokenRequest
Authorize Basic username : fooClientId password : secret
URL Parameters token: <token>
Response
{ "user_name": "phongsathorn", "scope": [ "read" ], "active": true, "exp": 1577482177, "authorities": [ "ROLE_USER" ], "jti": "9bd13c7f-60db-4bf4-81ef-6e6e44319ce1", "client_id": "fooClientId" }
-
Check authentication token
GET
auth/api/v1.0/meRequest
Authorize Bearer <token>
Response
{ "id": 2, "username": "phongsathorn", "firstname": "Phongsathorn", "lastname": "Kittiworapanya", "email": "[email protected]", "role": "ROLE_USER", "_enabled": true }
-
Register client
GET
auth/client/registerRequest
Authorize Bearer <token>
Multipart form name: <client name> email: <developer email> homepageUrl: <product homepage> description: <product description> redirectUrl: <OAuth2 redirect url>
Response
{ "id": 4, "version": null, "oauth_client_id": { "id": null, "version": null, "clientId": "f6f7fdbe-6acc-4594-a234-3e0ee3c74ee2", "resourceIds": null, "clientSecret": "jknREJSIAOZqsXAXRg3OL6f4iqvc8H", "scope": "read,write", "grantTypes": "password,authorization_code,refresh_token", "webServerRedirectUri": "https://www.google.com/", "authorities": "ROLE_USER", "accessTokenValidity": 2592000, "refreshTokenValidity": 2678400, "additionalInfo": null, "autoApprove": null }, "name": "TestClient2", "email": "[email protected]", "homepageUrl": "https://www.google.com/", "description": "This is test client 1" }
-
Client Authorize
GET
auth/oauth/authorizeRequest
URL Parameters client_id: <client_id> response_type: code redirect_uri: <redirect_uri>
-
User register
POST
auth/api/v1.0/registerRequest
JSON request { "username": "phongsathorn", "firstname": "Phongsathorn", "lastname": "Kittiworapanya", "password": "password", "email": "[email protected]", "role": "ROLE_USER" }
-
-
ค้นหาโรงพยาบาลที่ใกล้เคียงซึ่งมีจิตแพทย์พร้อมให้การรักษา
-
🌱 Usage
- get all location
GET hospital/location/
# Response Type [ { "id": int, "name": string, "description": string, "created_at": string, "latitude": float, "longitude": float } ]
- add location
POST hospital/location/
# Payload Type [ { "name": string, "description": string, "latitude": float, "longitude": float } ]
- get specific location
GET hospital/location/<id>
# Response Type { "id": int, "name": string, "description": string, "created_at": string, "latitude": float, "longitude": float }
- edit location infomation
PATCH hospital/location/<id>
PUT hospital/location/<id>
# Payload Type # PUT requires all fields, patch otherwise [ { "name": string, "description": string, "latitude": float, "longitude": float } ]
- delete location infomation
DELETE hospital/location/<id>
- get filter location using user location
GET hospital/location/filter
# Parameter lat = "float: user's latitude" lon = "float: user's longitude" km = "float: filter distance"
# Response Type [ { "id": int, "name": string, "description": string, "created_at": string, "latitude": float, "longitude": float } ]
-
-
- ให้คำแนะนำเกี่ยวกับการรักษาโรคซึมเศร้า ทั้งในด้านการดูแลตนเองและแนวทางการรักษาของแพทย์
- ทำการรับคะแนนที่ได้จาก Depression Test Service มาให้คำแนะนำในการรักษา
- รับคำแนะนำการรักษา
URL:
suggest/suggest/suggestion/{total_score}
Method:GET
*หมายเหตุ : เพื่อป้องกันข้อผิดพลาดด้านการแสดงผลกรุณาใช้ Postman- Get Suggestion
- Response :
{ "id": 5, "depressed_level": "มีภาวะซึมเศร้าปานกลาง", "text": "ควรพักผ่อนให้เพียงพอ นอนหลับให้ได้ 6-8 ชั่วโมง ออกกำลังกายสม่ำเสมอ ทำกิจกรรมที่ทำให้ผ่อนคลาย พบปะเพื่อนฝูง ควรขอคำปรึกษาช่วยเหลือจากผู้ที่ไว้วางใจ ไม่จมอยู่กับปัญหา มองหาหนทางคลี่คลาย หากอาการที่ท่านเป็นมีผลกระทบต่อการทำงานหรือการเข้าสังคม (อาการซึมเศร้าทำให้ท่านมีปัญหาในการทำงาน การดูแลสิ่งต่างๆ ในบ้าน หรือการเข้ากับผู้คน ในระดับมากถึงมากที่สุด) หรือหากท่านมีอาการระดับนี้มานาน 1-2 สัปดาห์แล้วยังไม่ดีขึ้น ควรพบแพทย์เพื่อรับการช่วยเหลือรักษา" }
- ดูคำแนะนำการรักษาทั้งหมด
URL :
suggest/suggest/suggestion_list
Method:GET
*หมายเหตุ : เพื่อป้องกันข้อผิดพลาดด้านการแสดงผลกรุณาใช้ Postman- Get Suggestion List
- Response
[ { "id": 3, "depressed_level": "ไม่มีภาวะซึมเศร้า", "text": "ไม่จำเป็นต้องรักษา" }, { "id": 4, "depressed_level": "มีภาวะซึมเศร้าเล็กน้อย", "text": "ควรพักผ่อนให้เพียงพอ นอนหลับให้ได้ 6-8 ชั่วโมง ออกกำลังกายสม่ำเสมอ ทำกิจกรรมที่ทำให้ผ่อนคลาย พบปะเพื่อนฝูง ควรทำแบบประเมินอีกครั้งใน 1 สัปดาห์" }, { "id": 5, "depressed_level": "มีภาวะซึมเศร้าปานกลาง", "text": "ควรพักผ่อนให้เพียงพอ นอนหลับให้ได้ 6-8 ชั่วโมง ออกกำลังกายสม่ำเสมอ ทำกิจกรรมที่ทำให้ผ่อนคลาย พบปะเพื่อนฝูง ควรขอคำปรึกษาช่วยเหลือจากผู้ที่ไว้วางใจ ไม่จมอยู่กับปัญหา มองหาหนทางคลี่คลาย หากอาการที่ท่านเป็นมีผลกระทบต่อการทำงานหรือการเข้าสังคม (อาการซึมเศร้าทำให้ท่านมีปัญหาในการทำงาน การดูแลสิ่งต่างๆ ในบ้าน หรือการเข้ากับผู้คน ในระดับมากถึงมากที่สุด) หรือหากท่านมีอาการระดับนี้มานาน 1-2 สัปดาห์แล้วยังไม่ดีขึ้น ควรพบแพทย์เพื่อรับการช่วยเหลือรักษา" }, { "id": 6, "depressed_level": "มีภาวะซึมเศร้ามาก", "text": "ควรพบแพทย์เพื่อประเมินอาการและให้การรักษา ระหว่างนี้ควรพักผ่อนให้เพียงพอ นอนหลับให้ได้ 6-8 ชั่วโมง ออกกำลังกายเบาๆ ทำกิจกรรมที่ทำให้ผ่อนคลาย ไม่เก็บตัว และควรขอคำปรึกษาช่วยเหลือจากผู้ใกล้ชิด" }, { "id": 7, "depressed_level": "มีภาวะซึมเศร้ารุนแรง", "text": "ต้องพบแพทย์เพื่อประเมินอาการและให้การรักษาโดยด่วน ไม่ควรปล่อยทิ้งไว้" } ]
- รับคำแนะนำการรักษา
URL:
-
- แนะนำ Events ที่มีส่วนช่วยพัฒนาสุขภาพจิต และ ป้องกัน Mental Disorder ที่ถูกจัดขึ้นในประเทศไทย เช่น กิจกรรรมของ Chula-Wellness
เป็น Service สำหรับการจัดการ Event ในโปรเจ็ค Depression โดยจะสามารถเพิ่ม ดูรายการ Event ทั้งหมด ดูแต่ละ Event และก็ลบ
Example :
[
{
"event_name" : "KMITL_Marathon",
"event_details" : "วิ่งเพื่อนการกุศล",
"event_date" : "2020-01-22",
"event_place" : "คณะเทคโนโลยีสารสนเทศ"
}
]
จะ Return กลับมาให้เป็น Json
Example :
[
{
"event_name" : "Present_project",
"event_datails" : "present mircroservice",
"event_date" : "2020-3-21",
"event_place" : "IT"
}
]
Group 14
พงศธร กิตติวรปัญญา | ภูรี กานุสิทธิ์ | ภาสวิชญ์ ริ้วทอง | วริศ การย์บรรจบ | ชญานิน ลำยอง |
60070055 | 60070075 | 60070073 | 60070087 | 60070012 |
@Phongsathron | @realkyr | @dekdew | @WaiWarit | @azurelisz |