Giter Club home page Giter Club logo

challenge-java-crud's Introduction

Task - ADS

Gerenciador de pacientes

Groups

1. Alan
2. Henrique
3. Bruno
4. Raiza
5. Kelner

API de terceiro utilizada.

  • VIA CEP

Documentação

Como instalar?

  1. git clone https://github.com/alandev2/firc-project.git
  2. Implementar banco de dados usando query no mysql.sql
  3. execute o projeto
  4. teste :D

Routers

Patients

CONSULTAR PACIENTES

[ GET ]
http://localhost:8080/patients?
	field_name={NOME DO CAMPO}&
	field_value={VALOR DE FILTRO}


{ //  Lista de pacientes | 200  //
	"message": "Lista de pacientes",
	"status": "success"
	"data": [
		{
			"name": "julinha",
			"cpf": "1231111",
			"rg": "123",
			"data_nasc": "11/11/1111",
			"tipo_sanguinio": "O+",
			"cep": "50110535",
			"uf": "PE",
			"localidade": "Recife",
			"bairro": "Santo Amaro",
			"rua": "Rua aurora",
			"numero": 123
		}
	],
}

CADASTRAR PACIENTE

[ POST ]
http://localhost:8080/patients


//  Corpo da requisição   //
{
	"name": "julinha",
	"cpf": "1231111",
	"rg": "123",
	"data_nasc": "11/11/1111",
	"tipo_sanguinio": "O+",
	"cep": "50110535",
	"uf": "PE",  // Necessário ser igual ao do cep
	"localidade": "Recife",  // Necessário ser igual ao do cep
	"bairro": "Santo Amaro", // Necessário ser igual ao do cep
	"rua": "Rua aurora",
	"numero": 123
}

// ## RETORNOS ##

{ //   Paciente cadastrado | 201  //
	"message": "Paciente cadastrado com sucesso",
	"status": "success",
	"data": null
}

{ //   Campo invalido | 400  //
	"message": "Bairro diferente do consultado no cep",
	"status": "error",
	"data": null
}

{ //   Erro interno | 500  //
	"message": "Erro interno",
	"status": "error",
	"data": null
}

ATUALIZAR PACIENTE

[ PUT ]
http://localhost:8080/patients/{ID DO PACIENTE}


//  Corpo da requisição   //
{
	"name": "julinha",
	"cpf": "1231111",
	"rg": "123",
	"data_nasc": "11/11/1111",
	"tipo_sanguinio": "O+",
	"cep": "50110535",
	"uf": "PE",  // Necessário ser igual ao do cep
	"localidade": "Recife",  // Necessário ser igual ao do cep
	"bairro": "Santo Amaro", // Necessário ser igual ao do cep
	"rua": "Rua aurora",
	"numero": 123
}

// ## RETORNOS ##

{ //   Paciente atualizado | 200  //
	"message": "Paciente atualizado com sucesso",
	"status": "success",
	"data": null
}

{ //   Campo invalido | 400  //
	"message": "Bairro/Cidade/UF diferente do consultado no cep",
	"status": "error",
	"data": null
}

{ //   Paciente não encontrado | 404  //
	"message": "Paciente não encontrado",
	"status": "error",
	"data": null
}

{ //   Erro interno | 500  //
	"message": "Erro interno",
	"status": "error",
	"data": null
}

Exams

LIST

[ GET ] http://localhost:8080/exams?field_name={NOME DO CAMPO}&field_value={VALOR DE FILTRO}

CRIAR EXAME ATRELADO A PACIENTE

> [ POST ] http://localhost:8080/exams


{ // Corpo da requisição
	"patient_id": "ID DO PACIENTE",
	"type": "TIPO DE EXAME",
	"description": "DESCRIÇÃO DO EXAME",
	"comments": "Observações",
	"result": "Status atual do exame"
}

// ## RETORNOS ##

{ //   Exame criado | 201  //
	"message": "Exame criado com sucesso",
	"status": "success",
	"data": null
}

{ //   Erro interno | 500  //
	"message": "Erro interno",
	"status": "error",
	"data": null
}

challenge-java-crud's People

Contributors

alandeev avatar

Watchers

 avatar

Forkers

rvizvg

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.