POST api/Patients/CreateNewReferral

Request Information

URI Parameters

None.

Body Parameters

NewReferralRequest
NameDescriptionTypeAdditional information
PatientId

integer

None.

DiagnosisId

integer

None.

ReferralType

integer

None.

DistrictId

integer

None.

DHQId

integer

None.

ReferredFor

Collection of AppointmentRequest

None.

Request Formats

application/json, text/json

Sample:
{
  "PatientId": 1,
  "DiagnosisId": 2,
  "ReferralType": 3,
  "DistrictId": 4,
  "DHQId": 5,
  "ReferredFor": [
    {
      "DepartmentId": 1,
      "VendorId": 2,
      "AppointmentDate": "2026-01-13T07:52:51.5101985+05:00",
      "VendorName": "sample string 4"
    },
    {
      "DepartmentId": 1,
      "VendorId": 2,
      "AppointmentDate": "2026-01-13T07:52:51.5101985+05:00",
      "VendorName": "sample string 4"
    }
  ]
}

application/xml, text/xml

Sample:
<NewReferralRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PatientReferralsAPI.Models.Patient">
  <DHQId>5</DHQId>
  <DiagnosisId>2</DiagnosisId>
  <DistrictId>4</DistrictId>
  <PatientId>1</PatientId>
  <ReferralType>3</ReferralType>
  <ReferredFor>
    <AppointmentRequest>
      <AppointmentDate>2026-01-13T07:52:51.5101985+05:00</AppointmentDate>
      <DepartmentId>1</DepartmentId>
      <VendorId>2</VendorId>
      <VendorName>sample string 4</VendorName>
    </AppointmentRequest>
    <AppointmentRequest>
      <AppointmentDate>2026-01-13T07:52:51.5101985+05:00</AppointmentDate>
      <DepartmentId>1</DepartmentId>
      <VendorId>2</VendorId>
      <VendorName>sample string 4</VendorName>
    </AppointmentRequest>
  </ReferredFor>
</NewReferralRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'NewReferralRequest'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.