Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

employee_id is present in spec of Create/Update Employee request but absent in actual response #49

Closed
pzhuk opened this issue Jul 10, 2017 · 3 comments
Assignees
Labels

Comments

@pzhuk
Copy link
Contributor

pzhuk commented Jul 10, 2017

Steps to Reproduce (Repro steps)

  • endpoint address: demo.ehealth.world/api/employee_requests
  • preconditions if any: no any preconditions
  • sequence of actions that should be taken to reproduce the behavior.
POST /api/employee_requests HTTP/1.1
Host: demo.ehealth.world
Content-Type: application/json
Authorization: Bearer OHJQODZwOVNpRjVBdEVqa3ZLbU1oZz09
Cache-Control: no-cache
Postman-Token: 1dda5c66-9d3f-c4eb-4f6d-1a7e9db13c28

{
  "employee_request": {
    "legal_entity_id": "786d84d9-e1c5-4d58-9f0f-f5f3d826b26e",
    "position": "P1",
    "start_date": "2017-03-02",
    "status": "NEW",
    "employee_type": "DOCTOR",
    "party": {
      "first_name": "Петро",
      "last_name": "Іванов",
      "second_name": "Миколайович",
      "birth_date": "1991-08-25",
      "gender": "MALE",
      "tax_id": "2345678902",
      "email": "sp.virny+51@gmail.com",
      "documents": [
        {
          "type": "PASSPORT",
          "number": "120518"
        }
      ],
      "phones": [
        {
          "type": "MOBILE",
          "number": "+380503410870"
        }
      ]
    },
    "doctor": {
      "educations": [
        {
          "country": "UA",
          "city": "Київ",
          "institution_name": "Академія Богомольця",
          "issued_date": "2017-08-05",
          "diploma_number": "DD123543",
          "degree": "MASTER",
          "speciality": "Педіатр"
        }
      ],
      "qualifications": [
        {
          "type": "AWARDING",
          "institution_name": "Академія Богомольця",
          "speciality": "Педіатр",
          "issued_date": "2017-08-05",
          "certificate_number": "2017-08-05"
        }
      ],
      "specialities": [
        {
          "speciality": "PEDIATRICIAN",
          "speciality_officio": true,
          "level": "FIRST",
          "qualification_type": "AWARDING",
          "attestation_name": "Академія Богомольця",
          "attestation_date": "2017-08-05",
          "valid_to_date": "2017-08-05",
          "certificate_number": "AB/21331"
        }
      ],
      "science_degree": {
        "country": "UA",
        "city": "Київ",
        "degree": "Доктор філософії",
        "institution_name": "Академія Богомольця",
        "diploma_number": "DD123543",
        "speciality": "THERAPIST",
        "issued_date": "2017-08-05"
      }
    }
  }
}

Actual result

{
  "meta": {
    "url": "http://demo.ehealth.world/api/employee_requests",
    "type": "object",
    "request_id": "mj3r8orsruttv67gd7v2vgo5dead1nlu",
    "code": 200
  },
  "data": {
    "updated_at": "2017-07-10T13:35:12.780573",
    "status": "NEW",
    "start_date": "2017-03-02",
    "position": "P1",
    "party": {
      "tax_id": "2345678902",
      "second_name": "Миколайович",
      "phones": [
        {
          "type": "MOBILE",
          "number": "+380503410870"
        }
      ],
      "last_name": "Іванов",
      "gender": "MALE",
      "first_name": "Петро",
      "email": "sp.virny+51@gmail.com",
      "documents": [
        {
          "type": "PASSPORT",
          "number": "120518"
        }
      ],
      "birth_date": "1991-08-25"
    },
    "legal_entity_id": "786d84d9-e1c5-4d58-9f0f-f5f3d826b26e",
    "inserted_at": "2017-07-10T13:35:12.780558",
    "id": "a1e46294-0666-4d7e-b588-38c15337a318",
    "employee_type": "DOCTOR",
    "doctor": {
      "specialities": [
        {
          "valid_to_date": "2017-08-05",
          "speciality_officio": true,
          "speciality": "PEDIATRICIAN",
          "qualification_type": "AWARDING",
          "level": "FIRST",
          "certificate_number": "AB/21331",
          "attestation_name": "Академія Богомольця",
          "attestation_date": "2017-08-05"
        }
      ],
      "science_degree": {
        "speciality": "THERAPIST",
        "issued_date": "2017-08-05",
        "institution_name": "Академія Богомольця",
        "diploma_number": "DD123543",
        "degree": "Доктор філософії",
        "country": "UA",
        "city": "Київ"
      },
      "qualifications": [
        {
          "type": "AWARDING",
          "speciality": "Педіатр",
          "issued_date": "2017-08-05",
          "institution_name": "Академія Богомольця",
          "certificate_number": "2017-08-05"
        }
      ],
      "educations": [
        {
          "speciality": "Педіатр",
          "issued_date": "2017-08-05",
          "institution_name": "Академія Богомольця",
          "diploma_number": "DD123543",
          "degree": "MASTER",
          "country": "UA",
          "city": "Київ"
        }
      ]
    }
  }
}

Expected result

As per specification there should be employee_id returned as well as id
However we could see only id being returned

@pzhuk
Copy link
Contributor Author

pzhuk commented Jul 10, 2017

@lymychp mistake in spec?

@lymychp
Copy link
Member

lymychp commented Jul 11, 2017

spec is fine.
employee_id is optional. It should be in response only if it has been passed in request.
Not a bug)

@lymychp lymychp assigned pzhuk and unassigned lymychp Jul 24, 2017
@lymychp
Copy link
Member

lymychp commented Jul 24, 2017

@pzhuk propose to close this issue

@pzhuk pzhuk added the invalid label Jul 24, 2017
@pzhuk pzhuk closed this as completed Jul 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants