Code Monkey home page Code Monkey logo

koa-crf's Introduction

CRF

CRF for Biofarma
Build Status

Available requests

Public:
GET /login { phone, name } -> { payload: { token, user } }

Private:
For private request send Authentication: Bearer <TOKEN> header, where TOKEN is a string returned in /login request payload.
GET /logout -> {payload: true}

GET /api/v1/users -> {payload: [Users]}
GET /api/v1/users/:id -> {payload: User}
POST /api/v1/users {phone, password, role, name} -> {payload: User}
DELETE /api/v1/users/:id -> {payload: User}

GET /api/v1/researches -> {payload: [Research]}
GET /api/v1/researches/:id -> {payload: Research}
POST /api/v1/researches {name: String, dateStart: Date, dateEnd: Date, clinics: [String]} -> {payload: Research}
DELETE /api/v1/researches/:id -> {payload: Research}

GET /api/v1/researches/:rid/clinics -> {payload: [Clinic]}
GET /api/v1/researches/:rid/clinics/:cid -> {payload: Clinic}
POST /api/v1/researches/:rid/clinics {name: String, address: String, researchId: String, doctors: [String]} -> {payload: Clinic}

DELETE /api/researches/:rid/clinics/:cid -> {payload: Clinic}

GET /api/v1/researches/:rid/clinics/:cid/patients -> {payload: [Patient]}
GET /api/v1/researches/:rid/clinics/:cid/patient/:pid -> {payload: Patient}
POST /api/v1/researches/:rid/clinics/:cid/patients {name: String, doctorId: String, dateOfBirth: Date, weight: Number, visits: [any], sideEffects: [any], therapy: [any], anamnesis: [any]} -> { payload: Patient }
DELETE /api/researches/:rid/clinics/:cid/patient/:pid -> {payload: Patient}

Error responses:
Error response can return custom error such as Not Found (404), Bad Request (400), Unauthorized (401), Forbidden (403), return value will be { error: String }

Create admin user using special url (only dev/test env)

GET /api/v1/gen/superuser -> { payload: User }

koa-crf's People

Contributors

staticbass avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.