POST api/v1/xref/{tenantXRef}/patient/create

Creates a new patient for the practice (by business xref)

Request Information

URI Parameters

NameDescriptionTypeAdditional information
tenantXRef

ref key of the practice that owns the patient data

string

Required

Body Parameters

The patient object

Com.Healthbridge.Hhas.Cloud.WebRole.Areas.ExternalSystemIntegration.Model.CreatePatientRequest
NameDescriptionTypeAdditional information
BillingPracticeNo

string

None.

LooseValidation

boolean

None.

PatientVo

Com.Healthbridge.Hhas.Patient.Interface.ValueObjects.PatientVo

None.

UpdateOtherPatientsAccountDetails

boolean

None.

CorrelationIds

Collection of string

None.

OriginatedSystem

string

None.

Request Formats

application/json, text/json

Sample:
{
  "BillingPracticeNo": "sample string 1",
  "LooseValidation": true,
  "PatientVo": {
    "PatientId": "bac0eeb9-c63e-4a7a-b078-ad1f3d1dadf4",
    "PatientXRef": "sample string 2",
    "PracticeId": "d0456010-6961-43de-b54a-699b2c8f3f56",
    "FileNo": "sample string 4",
    "KnownAs": "sample string 5",
    "Occupation": "sample string 6",
    "Employer": "sample string 7",
    "PreferredLanguage": "sample string 8",
    "MaritalStatus": "sample string 9",
    "PatientDetails": {
      "Title": "sample string 1",
      "FirstName": "sample string 2",
      "Surname": "sample string 3",
      "DateOfBirth": "2025-04-22T00:02:04Z",
      "IdentityNo": "sample string 5",
      "Gender": "sample string 6",
      "ContactNo": "sample string 7",
      "EmailAddress": "sample string 8"
    },
    "PatientAccountDetails": {
      "AccountId": "7cf508ea-692b-463e-b75e-b59d7380c6f7",
      "AccountNo": "sample string 2",
      "IsCashAccount": true,
      "MedicalAidName": "sample string 4",
      "MedicalAidPlan": "sample string 5",
      "MedicalAidPlanOption": "sample string 6",
      "MedicalAidMembershipNumber": "sample string 7",
      "MedicalAidDependentCode": "sample string 8",
      "MedicalAidMainMemberDetails": {
        "Title": "sample string 1",
        "FirstName": "sample string 2",
        "Surname": "sample string 3",
        "DateOfBirth": "2025-04-22T00:02:04Z",
        "IdentityNo": "sample string 5",
        "Gender": "sample string 6",
        "ContactNo": "sample string 7",
        "EmailAddress": "sample string 8"
      },
      "MedicalAidRoutingCode": "sample string 9",
      "MedicalAidOptionCode": "sample string 10",
      "MedicalAidSchemeCode": "sample string 11",
      "MedicalAidPlanCode": "sample string 12"
    },
    "PhysicalAddress": {
      "Line1": "sample string 1",
      "Line2": "sample string 2",
      "Line3": "sample string 3",
      "Code": "sample string 4"
    },
    "PostalAddress": {
      "Line1": "sample string 1",
      "Line2": "sample string 2",
      "Line3": "sample string 3",
      "Code": "sample string 4"
    },
    "Deceased": true
  },
  "UpdateOtherPatientsAccountDetails": true,
  "CorrelationIds": [
    "sample string 1",
    "sample string 2"
  ],
  "OriginatedSystem": "sample string 4"
}

application/xml, text/xml

Sample:
<CreatePatientRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Com.Healthbridge.Hhas.Cloud.WebRole.Areas.ExternalSystemIntegration.Model">
  <CorrelationIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://mpsapi.healthbridge.com/platform/core/v1/command/">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </CorrelationIds>
  <OriginatedSystem xmlns="http://mpsapi.healthbridge.com/platform/core/v1/command/">sample string 4</OriginatedSystem>
  <LooseValidation xmlns="http://schemas.datacontract.org/2004/07/Com.Healthbridge.Hhas.Patient.Interface.Commands">true</LooseValidation>
  <PatientVo xmlns:d2p1="http://mpsapi.healthbridge.com/clinical/patient/v1/patient/" xmlns="http://schemas.datacontract.org/2004/07/Com.Healthbridge.Hhas.Patient.Interface.Commands">
    <d2p1:Deceased>true</d2p1:Deceased>
    <d2p1:Employer>sample string 7</d2p1:Employer>
    <d2p1:FileNo>sample string 4</d2p1:FileNo>
    <d2p1:KnownAs>sample string 5</d2p1:KnownAs>
    <d2p1:MaritalStatus>sample string 9</d2p1:MaritalStatus>
    <d2p1:Occupation>sample string 6</d2p1:Occupation>
    <d2p1:PatientAccountDetails>
      <d2p1:AccountId>7cf508ea-692b-463e-b75e-b59d7380c6f7</d2p1:AccountId>
      <d2p1:AccountNo>sample string 2</d2p1:AccountNo>
      <d2p1:IsCashAccount>true</d2p1:IsCashAccount>
      <d2p1:MedicalAidDependentCode>sample string 8</d2p1:MedicalAidDependentCode>
      <d2p1:MedicalAidMainMemberDetails>
        <d2p1:ContactNo>sample string 7</d2p1:ContactNo>
        <d2p1:DateOfBirth>2025-04-22T00:02:04.1954577+02:00</d2p1:DateOfBirth>
        <d2p1:EmailAddress>sample string 8</d2p1:EmailAddress>
        <d2p1:FirstName>sample string 2</d2p1:FirstName>
        <d2p1:Gender>sample string 6</d2p1:Gender>
        <d2p1:IdentityNo>sample string 5</d2p1:IdentityNo>
        <d2p1:Surname>sample string 3</d2p1:Surname>
        <d2p1:Title>sample string 1</d2p1:Title>
      </d2p1:MedicalAidMainMemberDetails>
      <d2p1:MedicalAidMembershipNumber>sample string 7</d2p1:MedicalAidMembershipNumber>
      <d2p1:MedicalAidName>sample string 4</d2p1:MedicalAidName>
      <d2p1:MedicalAidOptionCode>sample string 10</d2p1:MedicalAidOptionCode>
      <d2p1:MedicalAidPlan>sample string 5</d2p1:MedicalAidPlan>
      <d2p1:MedicalAidPlanCode>sample string 12</d2p1:MedicalAidPlanCode>
      <d2p1:MedicalAidPlanOption>sample string 6</d2p1:MedicalAidPlanOption>
      <d2p1:MedicalAidRoutingCode>sample string 9</d2p1:MedicalAidRoutingCode>
      <d2p1:MedicalAidSchemeCode>sample string 11</d2p1:MedicalAidSchemeCode>
    </d2p1:PatientAccountDetails>
    <d2p1:PatientDetails>
      <d2p1:ContactNo>sample string 7</d2p1:ContactNo>
      <d2p1:DateOfBirth>2025-04-22T00:02:04.1954577+02:00</d2p1:DateOfBirth>
      <d2p1:EmailAddress>sample string 8</d2p1:EmailAddress>
      <d2p1:FirstName>sample string 2</d2p1:FirstName>
      <d2p1:Gender>sample string 6</d2p1:Gender>
      <d2p1:IdentityNo>sample string 5</d2p1:IdentityNo>
      <d2p1:Surname>sample string 3</d2p1:Surname>
      <d2p1:Title>sample string 1</d2p1:Title>
    </d2p1:PatientDetails>
    <d2p1:PatientId>bac0eeb9-c63e-4a7a-b078-ad1f3d1dadf4</d2p1:PatientId>
    <d2p1:PatientXRef>sample string 2</d2p1:PatientXRef>
    <d2p1:PhysicalAddress>
      <d2p1:Code>sample string 4</d2p1:Code>
      <d2p1:Line1>sample string 1</d2p1:Line1>
      <d2p1:Line2>sample string 2</d2p1:Line2>
      <d2p1:Line3>sample string 3</d2p1:Line3>
    </d2p1:PhysicalAddress>
    <d2p1:PostalAddress>
      <d2p1:Code>sample string 4</d2p1:Code>
      <d2p1:Line1>sample string 1</d2p1:Line1>
      <d2p1:Line2>sample string 2</d2p1:Line2>
      <d2p1:Line3>sample string 3</d2p1:Line3>
    </d2p1:PostalAddress>
    <d2p1:PracticeId>d0456010-6961-43de-b54a-699b2c8f3f56</d2p1:PracticeId>
    <d2p1:PreferredLanguage>sample string 8</d2p1:PreferredLanguage>
  </PatientVo>
  <UpdateOtherPatientsAccountDetails xmlns="http://schemas.datacontract.org/2004/07/Com.Healthbridge.Hhas.Patient.Interface.Commands">true</UpdateOtherPatientsAccountDetails>
  <BillingPracticeNo>sample string 1</BillingPracticeNo>
</CreatePatientRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'CreatePatientRequest'.

Response Information

Resource Description

NodeId of the patient

Com.Healthbridge.Core.CommonDomain.Interface.ValueObjects.RestApiResultOfSystem.Guid
NameDescriptionTypeAdditional information
Sucess

boolean

None.

ResponseCode

integer

None.

ResponseMessage

string

None.

Data

globally unique identifier

None.

Links

Collection of Com.Healthbridge.Core.CommonDomain.Interface.ValueObjects.RestApiLink

None.

Response Formats

application/json, text/json

Sample:
{
  "Sucess": true,
  "ResponseCode": 2,
  "ResponseMessage": "sample string 3",
  "Data": "5a2b5eef-4f21-4127-8866-85ea515f8b59",
  "Links": [
    {
      "Rel": "sample string 1",
      "HRef": "sample string 2"
    },
    {
      "Rel": "sample string 1",
      "HRef": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<RestApiResultOfguid xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Com.Healthbridge.Core.CommonDomain.Interface.ValueObjects">
  <Data>5a2b5eef-4f21-4127-8866-85ea515f8b59</Data>
  <Links>
    <RestApiLink>
      <HRef>sample string 2</HRef>
      <Rel>sample string 1</Rel>
    </RestApiLink>
    <RestApiLink>
      <HRef>sample string 2</HRef>
      <Rel>sample string 1</Rel>
    </RestApiLink>
  </Links>
  <ResponseCode>2</ResponseCode>
  <ResponseMessage>sample string 3</ResponseMessage>
  <Sucess>true</Sucess>
</RestApiResultOfguid>