Skip to content

yuhexiong/hospital-fee-api-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hospital Fee API

Version

  • Typescript v4.9.5
  • MariaDB v10.5

ENV

copy .env.example and rename as .env

NODE_ENV=production

# local database
DB_HOST=
DB_PORT=
DB_USER=
DB_PASS=
DB_NAME=

# port
PORT =

Run

# install dependencies
npm i

# run
npm start

# run test case
npm test

API

Request

GET /getFee

curl --location 'localhost:8080/getFee?birthday=0520102&systemDate=2021-10-27'

Response

HTTP/1.1 200 OK
Status: 200 OK

{"amount": 150}

Request

POST /getPatient

curl --location 'localhost:8080/getPatient' \
--header 'Content-Type: application/json' \
--data '{"patientId":3, "systemDate":"2012-10-27"}'

Response

HTTP/1.1 200 OK
Status: 200 OK
Content-Type: application/json

{
    "patient": {
        "id": 3,
        "name": "莊小云",
        "birth": "0771003",
        "gender": "女",
        "age": 24,
        "nationality": "台灣"
    },
    "amount": 150
}

MariaDB

docs

Test

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published