| Home | Sprints | Requisitos | Arquitetura | Configuração | Endpoints | Mockups | Problemas |
|---|
Abaixo os comandos o cadastro e funções dentro do aplicativo:
1. Usuário:
{
"id": "",
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true
}
{
"id": 1,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true
}
{
"id": 1,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true,
"valid": true
}
{
"Usuarios": [
{
"id": 1,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true,
"valid": true
},
{
"id": 2,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true,
"valid": true
}
]
}
Sem retorno de json
2. Ingredientes e seus Atributos:
{
"id": "",
"nome": "Arroz",
"origem": "Taco",
"status": true,
"criador": { "id": 1 },
"ingredienteAtributo": [
{
"atributo": { "id": 1, "tipo" : "NULL" },
"valor": "45"
}
],
"tipo": "PRIVADO", *** ou "COMUM"
}
{
"id": "1",
"nome": "Arroz",
"origem": "Taco",
"status": true,
"criador": { "id": 1, "tipo" : "NULL" },
"ingredienteAtributo": [
{
"atributo": { "id": 1 },
"valor": "45"
},
{
"atributo": { "id": 2 },
"valor": null
}
],
"tipo": "PRIVADO", *** ou "COMUM"
}
{
"id": 1,
"nome": "testeMock6734",
"origem": "tacoMock",
"status": true,
"tipo": "PRIVADO", *** ou "COMUM"
"criador": {
"id": 1,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true,
"valid": true
},
"ingredienteAtributo": [
{
"atributo": {
"id": 3,
"nome": "falasio",
"unidade": "o",
"multiplicador": 9,
"obrigatorio": true,
"status": true,
"active": true
},
"valor": null
},
{
"atributo": {
"id": 1,
"nome": "calcioEdited",
"unidade": "ga",
"multiplicador": 41,
"obrigatorio": false,
"status": true,
"active": true
},
"valor": "46"
}
]
}
{
"Ingredientes": [
{
"id": 1,
"nome": "Arroz",
"origem": "Taco",
"tipo": "COMUM", ** ou "PRIVADO"
"criador": {
"id": 1,
"cpf": "1111111112",
"email": "[email protected]",
"matricula": "101011",
"nome": "Admin1",
"senha": "e10adc3949ba59abbe56e057f20f883e",
"tipo": "ADMIN", *** ou "USER"
"status": true,
"valid": true
},
"ingredienteAtributo": [
{
"atributo": {
"id": 1,
"nome": "potasio",
"unidade": "g",
"multiplicador": 5,
"obrigatorio": true,
"status": true,
"active": true
},
"valor": "45"
},
{
"atributo": {
"id": 2,
"nome": "calcio",
"unidade": "g",
"multiplicador": 9,
"obrigatorio": true,
"status": true,
"active": true
},
"valor": null
},
......
],
"status": true
},
outros ingrediente......
]
}
3. Atributos:
{
"id": "",
"nome": "calcio",
"unidade": "g",
"multiplicador": 41,
"ordem": 1,
"obrigatorio": false,
"status": true,
"active": true
}
{
"id": "1",
"nome": "calcio",
"unidade": "g",
"multiplicador": 41,
"ordem": 1,
"obrigatorio": false,
"status": true
}
{
"id": "1",
"nome": "calcio",
"unidade": "g",
"multiplicador": 41,
"ordem": 1,
"obrigatorio": false,
"status": true
}
{
"Atributos": [
{
"id": 1,
"nome": "calcioEdited",
"unidade": "ga",
"multiplicador": 41,
"obrigatorio": false,
"ordem": 1,
"status": true,
"active": true
},
.......
]
}
4. Grupos de Receitas:
{
"id": "",
"nome": "Sobremesa",
"custo": 32,
"status": true
}
{
"id": 12,
"nome": "Sobremesa",
"custo": 32,
"status": true
}
{
"id": 12,
"nome": "Sobremesa",
"custo": 32,
"status": true,
"active": true
}
{
"Grupos": [
{
"id": 1,
"nome": "Sobremesa",
"custo": 32,
"status": true,
"active": true
},
......
]
}
5. Login:
{
"email" : "[email protected]",
"senha" : "123456"
}
6. Receitas:
{
"id": "",
"nome": "Trufas de Chocolate",
"status": "true",
"passos": [
"limpar",
"fever",
"reserve"
],
"rendimento": 20,
"tempo": "2 horas",
"imagem": "Imagem",
"tipo": "PUBLICO",
"criadores":[{"id": "1", "tipo":"NULL"}],
"receitaIngrediente": [
{
"ingrediente": {"id": 1, "tipo":"NULL"},
"custoKg": "5",
"pesoG": "5"
}
],
"professor": {"id": "1", "tipo":"NULL"},
"grupoReceita": {"id": "1"}
}
{
"id": "2",
"nome": "Trufas de Chocolate",
"status": "true",
"passos": [
"limpar",
"fever",
"reserve"
],
"rendimento": 20,
"tempo": "2 horas",
"imagem": "Imagem",
"tipo": "PUBLICO",
"criadores":[{"id": "1", "tipo":"NULL"}],
"receitaIngrediente": [
{
"ingrediente": {"id": 1, "tipo":"NULL"},
"custoKg": "5",
"pesoG": "5"
}
],
"professor": {"id": "1", "tipo":"NULL"},
"grupoReceita": {"id": "1"}
}
{
"id": 2,
"nome": "Trufas de Chocolate2",
"status": false,
"passos": [
"limpar",
"fever",
"reserve"
],
"rendimento": 24,
"criadores": [
{
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
}
],
"receitaIngrediente": [
{
"ingrediente": {
"id": 1,
"nome": "Feijao7",
"criador": {
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
},
"origem": "Taco1",
"status": true,
"ingredienteAtributo": [
{
"atributo": {
"id": 1,
"nome": "calcio",
"unidade": "g",
"multiplicador": 41,
"obrigatorio": false,
"status": true,
"active": true
},
"valor": "23"
}
],
"tipo": "PRIVADO"
},
"custoKg": 5,
"pesoG": 5
}
],
"professor": {
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
},
"grupoReceita": {
"id": 1,
"nome": "Sobremesa",
"custo": 32,
"status": true,
"active": true
}
}
{
"Receitas": [
{
"id": 2,
"nome": "Trufas de Chocolate2",
"status": false,
"passos": [
"limpar",
"fever",
"reserve"
],
"rendimento": 24,
"criadores": [
{
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
}
],
"receitaIngrediente": [
{
"ingrediente": {
"id": 1,
"nome": "Feijao7",
"criador": {
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
},
"origem": "Taco1",
"status": true,
"ingredienteAtributo": [
{
"atributo": {
"id": 1,
"nome": "calcio",
"unidade": "g",
"multiplicador": 41,
"obrigatorio": false,
"status": true,
"active": true
},
"valor": "23"
}
],
"tipo": "PRIVADO"
},
"custoKg": 5,
"pesoG": 5
}
],
"professor": {
"id": 1,
"cpf": "1111111111",
"email": "[email protected]",
"matricula": "101010",
"nome": "Admin",
"senha": "c56d0e9a7ccec67b4ea131655038d604",
"tipo": "ADMIN",
"status": true,
"valid": true
},
"grupoReceita": {
"id": 1,
"nome": "Sobremesa",
"custo": 32,
"status": true,
"active": true
}
},
......
]
}
7. Pacientes:
POST api/pacientes
{
"nome": "João da Silva",
"sexo": "M",
"dataNascimento": "1990-03-15",
"restricaoAlimentar": "eutrofico"
}
PUT api/pacientes/update
{
"id": 1,
"nome": "João da Silva",
"sexo": "M",
"dataNascimento": "1990-03-15",
"restricaoAlimentar": "eutrofico"
}
GET api/pacientes/{id}
{
"id": 1,
"nome": "João da Silva",
"sexo": "M",
"dataNascimento": "1990-03-15",
"restricaoAlimentar": "eutrofico",
"status": true
}
GET api/pacientes
{
"Pacientes": [
{
"id": 1,
"nome": "João da Silva",
"sexo": "M",
"dataNascimento": "1990-03-15",
"restricaoAlimentar": "eutrofico",
"status": true
},
{
"id": 2,
"nome": "Maria de Souza",
"sexo": "F",
"dataNascimento": "1980-07-28",
"restricaoAlimentar": "vegetariano",
"status": false
}
]
}
DELETE api/pacientes/{id}Sem retorno de JSON.
Atenção: apenas o status é alterado para false.
8. Atendimentos nutricionais:
POST api/atendimentos
{
"idAluno": 6,
"idPaciente": 1,
"idProfessor": 3,
"data": "2018-09-03"
}
PUT api/atendimentos/update
{
"id": 1,
"idAluno": 6,
"idPaciente": 1,
"idProfessor": 3,
"data": "2018-09-03",
"status": true
}
GET api/atendimentos/{id}
{
"id": 1,
"idAluno": 6,
"idPaciente": 1,
"idProfessor": 3,
"data": "2018-09-03",
"status": true
}
GET api/atendimentos
{
"Atendimentos": [
{
"id": 1,
"idAluno": 6,
"idPaciente": 1,
"idProfessor": 3,
"data": "2018-09-03",
"status": true
},
{
"id": 1,
"idAluno": 7,
"idPaciente": 2,
"idProfessor": 4,
"data": "2018-08-25",
"status": false
}
]
}
DELETE api/atendimentos/{id}Sem retorno de JSON.
Atenção: apenas o status é alterado para false.
9. Gasto energético:
Um registro de gasto energético está associado a um atendimento nutricional. Assim, nenhum registro de gasto energético tem ID próprio: seu ID é o ID do atendimento relacionado.
POST api/gasto_energetico
{
"idAtendimento": 4,
"fator": "SEDENTARIO",
"geb": 1.9,
"get": 3
}
PUT api/gasto_energetico/update
{
"idAtendimento": 4,
"fator": "MUITOINTENSO",
"geb": 1,
"get": 2
}
GET api/gasto_energetico/{id}
{
"idAtendimento": 4,
"fator": "MUITOINTENSO",
"geb": 1,
"get": 2,
"status": true
}
GET api/gasto_energetico
{
"Gastos": [
{
"idAtendimento": 4,
"fator": "MUITOINTENSO",
"geb": 1,
"get": 2,
"status": true
},
{
"idAtendimento": 2,
"fator": "BAIXO",
"geb": 3.9,
"get": 7.8,
"status": false
}
]
}
DELETE api/gasto_energetico/{id}Sem retorno de JSON.
Atenção: apenas o status é alterado para false.
10. Recordatório alimentar:
Um registro de recordatório alimentar está associado a um atendimento nutricional. Assim, nenhum registro de recordatório alimentar tem ID próprio: seu ID é o ID do atendimento relacionado.
POST api/recordatorios
{
"idAtendimento": 1,
"alimentos": [
{
"idIngrediente": 1,
"quantidade": 10,
"medida": "g"
},
{
"idIngrediente": 2,
"quantidade": 100,
"medida": "ml"
}
]
}
PUT api/recordatorios/update
{
"idAtendimento": 4,
"alimentos": [
{
"idIngrediente": 6,
"quantidade": 400,
"medida": "ml"
},
{
"idIngrediente": 4,
"quantidade": 290,
"medida": "g"
}
]
}
GET api/recordatorios/{id}
{
"id": 1,
"atendimento": {
"id": 1,
"aluno": {
"id": 7,
"cpf": "33333333335",
"email": "[email protected]",
"matricula": "301010",
...
},
"professor": {
"id": 2,
"cpf": "22222222222",
"email": "[email protected]",
"matricula": "201000",
...
},
"paciente": {
"id": 1,
"nome": "Paciente 1",
"sexo": "M",
...
},
"data": "2018-09-03",
"status": true
},
"alimentos": [
{
"id": 24,
"ingrediente": {
"id": 2,
"nome": "Arroz, integral, cozido",
"criador": {
"id": 1,
"cpf": "11111111111",
"email": "[email protected]",
"matricula": "101010",
...
},
"origem": "TACO",
"alergenico": null,
"status": true,
"ingredienteAtributo": [
{
"atributo": {
"id": 8,
"nome": "Sódio",
"unidade": null,
"multiplicador": 1,
...
},
"valor": "1"
},
{
"atributo": {
"id": 3,
"nome": "Proteínas",
"unidade": null,
"multiplicador": 4,
...
},
"valor": "2.6"
}
],
"tipo": "COMUM"
},
"quantidade": 100,
"medida": "ml"
},
{
"id": 23,
"ingrediente": {
"id": 1,
"nome": "Farinha, de trigo",
"criador": {
"id": 1,
"cpf": "11111111111",
"email": "[email protected]",
"matricula": "101010",
...
},
"origem": "TACO",
"alergenico": null,
"status": true,
"ingredienteAtributo": [
{
"atributo": {
"id": 8,
"nome": "Sódio",
"unidade": null,
"multiplicador": 1,
...
},
"valor": "1"
}
],
"tipo": "COMUM"
},
"quantidade": 10,
"medida": "g"
}
],
"status": true
}
GET api/recordatorios
{
"Recordatorios": [
{
"id": 1,
"atendimento": {
"id": 1,
"aluno": {
"id": 7,
"cpf": "33333333335",
"email": "[email protected]",
"matricula": "301010",
...
},
"professor": {
"id": 2,
"cpf": "22222222222",
"email": "[email protected]",
"matricula": "201000",
...
},
"paciente": {
"id": 1,
"nome": "Paciente 1",
"sexo": "M",
...
},
"data": "2018-09-03",
"status": true
},
"alimentos": [
{
"id": 24,
"ingrediente": {
"id": 2,
"nome": "Arroz, integral, cozido",
"criador": {
"id": 1,
"cpf": "11111111111",
"email": "[email protected]",
"matricula": "101010",
...
},
"origem": "TACO",
"alergenico": null,
"status": true,
"ingredienteAtributo": [
{
"atributo": {
"id": 2,
"nome": "Carboidratos",
"unidade": null,
"multiplicador": 4,
...
},
"valor": "25.8"
}
],
"tipo": "COMUM"
},
"quantidade": 100,
"medida": "ml"
},
{
"id": 23,
"ingrediente": {
"id": 1,
"nome": "Farinha, de trigo",
"criador": {
"id": 1,
"cpf": "11111111111",
"email": "[email protected]",
"matricula": "101010",
...
},
"origem": "TACO",
"alergenico": null,
"status": true,
"ingredienteAtributo": [
{
"atributo": {
"id": 7,
"nome": "Fibra alimentar",
"unidade": null,
"multiplicador": 1,
...
},
"valor": "2.3"
},
{
"atributo": {
"id": 6,
"nome": "Gorduras trans",
"unidade": null,
"multiplicador": 9,
...
},
"valor": "0"
}
],
"tipo": "COMUM"
},
"quantidade": 10,
"medida": "g"
}
],
"status": true
},
{
"id": 4,
"atendimento": {
"id": 4,
"aluno": {
"id": 7,
"cpf": "33333333335",
"email": "[email protected]",
"matricula": "301010",
...
},
"professor": {
"id": 2,
"cpf": "22222222222",
"email": "[email protected]",
"matricula": "201000",
...
},
"paciente": {
"id": 1,
"nome": "Paciente 1",
"sexo": "M",
...
},
"data": "2018-09-03",
"status": false
},
"alimentos": [
{
"id": 25,
"ingrediente": {
"id": 6,
"nome": "Arroz, tipo 2, cozido",
"criador": {
"id": 1,
"cpf": "11111111111",
"email": "[email protected]",
"matricula": "101010",
...
},
"origem": "TACO",
"alergenico": null,
"status": true,
"ingredienteAtributo": [
{
"atributo": {
"id": 5,
"nome": "Gorduras saturadas",
"unidade": null,
"multiplicador": 9,
...
},
"valor": "0.1"
}
],
"tipo": "COMUM"
},
"quantidade": 400,
"medida": "ml"
},
{
"id": 26,
"ingrediente": {
"id": 4,
"nome": "Arroz, tipo 1, cozido",
"criador": {
"id": 1,
"cpf": "11111111111",
"email": "[email protected]",
"matricula": "101010",
...
},
"origem": "TACO",
"alergenico": null,
"status": true,
"ingredienteAtributo": [
{
"atributo": {
"id": 7,
"nome": "Fibra alimentar",
"unidade": null,
"multiplicador": 1,
...
},
"valor": "1.6"
}
],
"tipo": "COMUM"
},
"quantidade": 290,
"medida": "g"
}
],
"status": true
}
]
}
DELETE api/recordatorios/{id}Sem retorno de JSON.
Atenção: apenas o status é alterado para false.
11. Avaliacao Antropometrica:
POST api/avaliacoesPUT api/avaliacoes/updateGET api/avaliacoes/{id}GET api/avaliacoesDELETE api/avaliacoes/{id}Sem retorno de JSON.
Atenção: apenas o status é alterado para false.
12. Plano Alimentar:
POST api/plano_alimentarPUT api/plano_alimentar/updateGET api/plano_alimentar/{id}GET api/plano_alimentarDELETE api/plano_alimentar/{id}Sem retorno de JSON.
Atenção: apenas o status é alterado para false.