Developer_API

Developer API

MDBilling.ca allows for 3rd party software developers to integrate and build on our proven platform.

If you are a software developer, you can save time and focus on your business by leveraging our proven OHIP billing platform. You can integrate MDBilling.ca to your application very easily through the MDBilling.ca API.  Add patients, create new claims, and claim data with a few  simple web requests.

The MDBilling.ca API is a RESTful service that uses JSON as the data format using a n HTTPS connection. Sample use cases are:

  • Focus on your EMR software application, not on the continuous changes with OHIP standards.
  • Faster time to market on your core business
  • Reduce development costs.

OVERVIEW:
Managing subscriptions accounts with the MDBilling.ca API has the same functionality available in the GUI web interface:

  • Create/update patient records
  • Create/update claim records
  • Retrieve claim rejection and payment report information
  • Submit claims to MOHLTC through EDT using our back-end process.

REQUESTING ACCESS:
API access can be requested by contacting us at support@mdbilling.ca

REQUEST URL:
All communications with our API use SSL encryption. Unencrypted HTTP connections are not allowed. The base API URL is as follows:

/API/

Each request requires the username and password as part of the request header. Additionally, all requests require a mdbilling.ca assigned Token Id.

TEST API:
MDBilling.ca will provide a test API that can be used for client applications to test changes to their system. Upon successful signup, mdbilling.ca will send the test API URL.

AUTHENTICATION:
We authenticate via Basic access Authentication through username/password. They username and password must be sent as part of the http request header in the following format which must then be base 64 encoded:

username:password

As an example, if the username and password was:

john.doe:abc123

The base 64 encoded string would be:

“Authorization: Basic am9obi5kb2U6YWJjMTIz ”

RESPONSE FORMAT:
MDBilling.ca API requests uses HTTP/JSON. For more information about this standard, please refer to the following links:

http://en.wikipedia.org/wiki/JSON

http://www.json.org/

API REQUEST DICTIONARY:
CreatePatient
UpdatePatient
DeletePatient
GetPatientById
CreateMOHGroup
DeleteMOHGroup
GetMOHGroups
CreateClaim
CreateClaimWithPatient
UpdateClaim
DeleteClaim
GetClaimByClaimId
FindClaims
GetQuantityFromTime
FindFacility
Errors

 

CreatePatient

Back to Request Dictionary

Type: POST
URL: /PatientAPI/CreatePatient
Description: Creates a new patient. The patient created must have a unique health card number and must not already exist.

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician to which this patient belongs to
FirstName String Yes Maximum of 50 characters
LastName String Yes Maximum of 50 characters
HealthCardNumber String Yes Healthcard number of the patient. Must be a minimum of 8 numbers to a maximum of 12 numbers.This field handles Ontario and non Ontario (i.e. RMB claims) health card numbers
PaymentProgram String Yes Must be one of the following values: HCP (most common), WCB (Worker’s Compensation Board) or RMB (Reciprocol Medical Billing. Represents non Ontario patients)
VersionCode String No Version code of the Ontario health card if the health card has one. Must be one or two characters in length (i.e. FF)
Province String No Not required if the patient has an Ontario health card. Required if the patient is a non Ontario resident. Allowed values are AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, SK, YT
Gender String Yes Must be either M (Male) or F (Female)
DateOfBirth Date Yes Date of birth of the patient. Must be in the format of dd-MM-yyyyT00:00:00
MRNNumber String No Represents the Medical Record Number of the hospital. Can be a maximum of 15 characters

Request Example:

{
“ClaimPatientParameters”: {
“FirstName”: “John”,
“LastName”: “Doe”,
“HealthCardNumber”: “1234567890”,
“VersionCode”: null,
“Province”: null,
“Gender”: “M”,
“DateOfBirth”: “1988-04-16T00:00:00”,
“MRNNumber”: null,
“PaymentProgram”: “HCP”
},
“TokenId”: “9de25a64-4108-4e74-80d4-85b727e2c333”,
“BillingNumber”: “123456”
}

Response Definition:

Parameter (s) Data Type Comment
PatientId number The Id of the patient that was just created

Response Example:

{
“PatientId”:202086
}

UpdatePatient

Back to Request Dictionary

Type: POST
URL: /PatientAPI/UpdatePatient
Description: Updates an existing patient

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician to which this patient belongs to
PatientId number Yes The Patient Id of the patient to be updated
FirstName String Yes Maximum of 50 characters
LastName String Yes Maximum of 50 characters
HealthCardNumber String Yes Healthcard number of the patient. Must be a minimum of 8 numbers to a maximum of 12 numbers.This field handles Ontario and non Ontario (i.e. RMB claims) health card numbers
PaymentProgram String Yes Must be one of the following values: HCP (most common), WCB (Worker’s Compensation Board) or RMB (Reciprocol Medical Billing. Represents non Ontario patients)
VersionCode String No Version code of the Ontario health card if the health card has one. Must be one or two characters in length (i.e. FF)
Province String No Not required if the patient has an Ontario health card. Required if the patient is a non Ontario resident. Allowed values are AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, SK, YT
Gender String Yes Must be either M (Male) or F (Female)
DateOfBirth Date Yes Date of birth of the patient. Must be in the format of dd-MM-yyyyT00:00:00
MRNNumber String No Represents the Medical Record Number of the hospital. Can be a maximum of 15 characters

Request Example:

{
“ClaimPatientParameters”: {
“PatientId”: 123,
“FirstName”: “John”,
“LastName”: “Doe”,
“HealthCardNumber”: “1234567890”,
“VersionCode”: null,
“Province”: null,
“Gender”: “M”,
“DateOfBirth”: “1988-04-16T00:00:00”,
“MRNNumber”: null,
“PaymentProgram”: “HCP”
},
“TokenId”: “9de25a64-4108-4e74-80d4-85b727e2c333”,
“BillingNumber”: “123456”
}

Response Definition:

Parameter (s) Data Type Comment
PatientId Number The Id of the patient that was just created

Response Example:

{
“PatientId”:202086
}

DeletePatient

Back to Request Dictionary

Type: POST
URL: /PatientAPI/DeletePatient
Description: Deletes an existing patient. Please note that this patient must not have any associated claims. If they do, the claims must be deleted first.

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician to which this patient belongs to
PatientId number Yes The Patient Id of the patient to be deleted

Request Example:

{
“PatientId”: 123,
“BillingNumber”: “123456”,
“TokenId”: “9de25a64-4108-4e74-80d4-85b727e2c333”
}

Response Definition:

Parameter (s) Data Type Comment
IsPatientDeleted Boolean A flag that indicates if the patient was successfully deleted

Response Example:

{
“IsPatientDeleted”:true
}

GetPatientById

Back to Request Dictionary

Type: GET
URL: /PatientAPI/GetPatientById
Description: Retrieves an existing patient.

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician to which this patient belongs to
PatientId Number Yes The Patient Id of the patient to be retrieved

Request Example:

/api/PatientAPI/GetPatientById?TokenId=9de25a64-4108-4e74-80d4-85b727e2c333& BillingNumber=123456& PatientId=123

Response Definition:

Parameter (s) Data Type Comment
PatientId Number Id of the patient
FirstName String First name of the patient
LastName String Last name of the patient
HealthCardNumber String Health card number of the patient
PaymentProgram String Payment program of the patient
VersionCode String Version code of the patient
Province String Contains null if patient is from Ontario
Gender String Gender of the patient (either M or F)
DateOfBirth Date Date of birth of the patient
MRNNumber String Represents the Medical Record Number of the hospital
LastReferringPhysician String Contains the 6 digit billing number of the last referring physician used for the most recent claim for this patient. May be null if this patient does not have any claims or no referring physician was used

Response Example:

{
PatientId”:123,
”FirstName”:”John”,
”LastName”:”Doe”,
”HealthCardNumber”:”1234567890″,
”PaymentProgram”:”HCP”,
”VersionCode”:null,
”Province”:null,
”Gender”:”M”,
”DateOfBirth”:”1988-04-16T00:00:00″,
”MRNNumber”:null,
”LastReferringPhysician”:null
}

CreateMOHGroup

Back to Request Dictionary

Type: POST
URL: /MOHGroupAPI/CreateMOHGroup
Description: Creates a new Ministry of Health Group for the physician. An error is returned if the group already exists

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician to which this patient belongs to
MOHGroup String Yes Ministry of Health assigned group identifier to be created. Must be 4 characters in length

Request Example:

{
“MOHGroup”: “ABCD”,
“BillingNumber”: “123456”,
“TokenId”: “9de25a64-4108-4e74-80d4-85b727e2c333”
}

Response Definition:

Parameter (s) Data Type Comment
IsMOHGroupCreated Boolean A flag that indicates if the group was created successfully

Response Example:

{
“IsMOHGroupCreated”:true
}

GetMOHGroups

Back to Request Dictionary

Type: GET
URL: /MOHGroupAPI/GetMOHGroups
Description: Retrieves a list of the physicians Ministry of Health groups

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician

Request Example:

/api/MOHGroupAPI/GetMOHGroups?TokenId=9de25a64-4108-4e74-80d4-85b727e2c333& BillingNumber=123456

Response Definition:

Parameter (s) Data Type Comment
Array of UserMOHGroup items:
MOHGroup String

Response Example:

{
“UserMOHGroups”:
[
{“MOHGroup”:”1234″},
{“MOHGroup”:”4567″},
{“MOHGroup”:”ABCD”},
{“MOHGroup”:”EFGH”}
]
}

DeleteMOHGroup

Back to Request Dictionary

Type: POST
URL: /MOHGroupAPI/DeleteMOHGroup
Description: Deletes a new Ministry of Health Group for the physician. An error is returned if the group does not exist

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician to which this Ministry of Health group belongs to
MOHGroup String Yes Ministry of Health assigned group identifier to be created. Must be 4 characters in length

Request Example:

{
“MOHGroup”: “ABCD”,
“BillingNumber”: “123456”,
“TokenId”: “9de25a64-4108-4e74-80d4-85b727e2c333”
}

Response Definition:

Parameter (s) Data Type Comment
IsMOHGroupDeleted Boolean A flag that indicates if the group was deleted successfully

Response Example:

{
“IsMOHGroupDeleted”:true
}

CreateClaim

Back to Request Dictionary

Type: POST
URL: /ClaimAPI/CreateClaim
Description: Creates a new claim

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician to which this claim belongs to
PatientId Number Yes The Id of the patient that this claim belongs to
AdmissionDate Date No The admission date of the patient for the claim. If it is sent, it must be in the format dd/mm/yyyy
ServiceLocationIndicator String No The service location indicator code for the claim. Accepted values are HDS, HED, HIP, HOP, HRP, OTN, IHF, OFF
ReferringPhysician String No The 6 digit number of the referring physician
Payee String Yes Must be P or S. For almost all claims, the value is generally P, which means payment to the physician. A value of S means payment to the Ministry of Health
MOHGroup String No The 4 character Ministry of Health assigned group
LabLicense String No The 4 character laboratory license
SpecialtyCode Number No The specialty code used for the claim. A specialty code is the two digit code that defines a physician’s discipline. For example, the value of 13 represents internal medicine. If no value is sent in, then the physician’s default specialty will be usedy
FacilityNumber Number No The Ministry of Health assigned facility number. This number is assigned to facilities recognized by the Ministry of Health (i.e hospitals, institutions, etc.). Not required if the patient was seen at a clinic
Status String Yes The status of the claim. Must be either SAVED (will not be submitted, but can be edited later) or SUBMIT (claim is ready to be submitted to the Ministry of Health)
ManualReview Boolean Yes A flag that indicates whether or not this claim needs to be manually reviewed by a claim assessor. For most claims, this value is false
Array of ClaimService items
ServiceCode String Yes The 5 character billing code associated with the claim. For example, A135A
ServiceDate Date Yes The date the service was performed. Must be in the format dd/mm/yyyy
DiagnosticCode String No The 3 or 4 character diagnostic code of the service. For example, 402
Quantity Number No The quantity this service was performed. This value required if no start and end time has been included. If a start time and end time have been included, this value must be blank. Must be a minimum of 1 to a maximum of 99
AddBasicUnits Boolean Yes A flag that determines if the basic units associated with the service code should be added to the total quantity. A value of true indicates that the basic units should be used and mdbilling will retrieve the associated basic units according to the code and add it to the quantity. This flag is generally associated with anesthesia or surgical assistant codes
Fee Number No The unit fee associated with the service. If no value is sent, then mdbilling.ca will retrieve the fee internally and use that value. Must be a minimum of 0.01 to a maximum of 9999.99
StartTime String No The start time of the service. If specified, the total quantity of the service is based on the end time subtracting the start time. Must be in the format of hh:mm. Required if no quantity has been specified. This is generally used for anesthesia or surgical assistant codes
EndTime String No The end time of the service. If specified, the total quantity of the service is based on the end time subtracting the start time. Must be in the format of hh:mm. Required if no quantity has been specified. This is generally used for anesthesia or surgical assistant codes
ParentServices String No A comma delimited string of parent service codes. This list is associated with the current service code wherein the code is a percentage premium. The codes in this list must be present and must have the same service date

Request Example:

{
“ClaimParameters”: {
“AdmissionDate”: null,
“ServiceLocationIndicator”: null,
“ReferringPhysician”: null,
“Payee”: “P”,
“MOHGroup”: null,
“LabLicense”: null,
“SpecialtyCode”: null,
“FacilityNumber”: null,
“FacilityDescription”: null,
“Status”: “SAVED”,
“ManualReview”: false
},
“PatientId”: 201969,
“ClaimServicesParameters”: [
{
“ServiceCode”: “A135A”,
“ServiceDate”: “2013-03-14T00:00:00”,
“DiagnosticCode”: “600”,
“Quantity”: 1,
“AddBasicUnits”: false,
“Fee”: null,
“StartTime”: null,
“EndTime”: null,
“ParentServices”: null
}
],
“TokenId”: “9de25a64-4108-4e74-80d4-85b727e2c333”,
“BillingNumber”: “123456”
}

Response Definition:

Parameter (s) Data Type Comment
ClaimId Number The Id of the claim that was just created

Response Example:

{
“ClaimId”:456
}

CreateClaimWithPatient

Back to Request Dictionary

Type: POST
URL: /ClaimAPI/CreateClaimWithPatient
Description: Creates a new claim and a new patient at the same time. The patient must not already exist

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician to which this claim belongs to
ClaimPatientParameters
FirstName String Yes Maximum of 50 characters
LastName String Yes Maximum of 50 characters
HealthCardNumber String Yes Healthcard number of the patient. Must be a minimum of 8 numbers to a maximum of 12 numbers. This field handles Ontario and non Ontario (i.e. RMB claims) health card numbers
PaymentProgram String Yes Must be one of the following values: HCP (most common), WCB (Worker’s Compensation Board) or RMB (Reciprocol Medical Billing. Represents non Ontario patients)
VersionCode String No Version code of the Ontario health card if the health card has one. Must be one or two characters in length (i.e. FF)
Province String No Not required if the patient has an Ontario health card. Required if the patient is a non Ontario resident. Allowed values are AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, SK, YT
Gender String Yes Must be either M (Male) or F (Female)
DateOfBirth date Yes Date of birth of the patient. Must be in the format of dd-MM-yyyyT00:00:00
MRNNumber String No Represents the Medical Record Number of the hospital. Can be a maximum of 15 characters
ClaimParameters
AdmissionDate Date No The admission date of the patient for the claim. If it is sent, it must be in the format dd/mm/yyyy
ServiceLocationIndicator String No The service location indicator code for the claim. Accepted values are HDS, HED, HIP, HOP, HRP, OTN, IHF, OFF
ReferringPhysician String No The 6 digit number of the referring physician
Payee String Yes Must be P or S. For almost all claims, the value is generally P, which means payment to the physician. A value of S means payment to the Ministry of Health
MOHGroup String No The 4 character Ministry of Health assigned group
LabLicense String No The 4 character laboratory license
SpecialtyCode Number No The specialty code used for the claim. A specialty code is the two digit code that defines a physician’s discipline. For example, the value of 13 represents internal medicine. If no value is sent in, then the physician’s default specialty will be used
FacilityNumber Number No The Ministry of Health assigned facility number. This number is assigned to facilities recognized by the Ministry of Health (i.e hospitals, institutions, etc.). Not required if the patient was seen at a clinic
Status String Yes The status of the claim. Must be either SAVED (will not be submitted, but can be edited later) or SUBMIT (claim is ready to be submitted to the Ministry of Health)
ManualReview Boolean Yes A flag that indicates whether or not this claim needs to be manually reviewed by a claim assessor. For most claims, this value is false
Array of ClaimServiceParameters items
ServiceCode String Yes The 5 character billing code associated with the claim. For example, A135A
ServiceDate Date Yes The date the service was performed. Must be in the format dd/mm/yyyy
DiagnosticCode String No The 3 or 4 character diagnostic code of the service. For example, 402
Quantity Number No The quantity this service was performed. This value required if no start and end time has been included. If a start time and end time have been included, this value must be blank. Must be a minimum of 1 to a maximum of 99
AddBasicUnits Boolean Yes A flag that determines if the basic units associated with the service code should be added to the total quantity. A value of true indicates that the basic units should be used and mdbilling will retrieve the associated basic units according to the code and add it to the quantity. This flag is generally associated with anesthesia or surgical assistant codes
Fee Number No The unit fee associated with the service. If no value is sent, then mdbilling.ca will retrieve the fee internally and use that value. Must be a minimum of 0.01 to a maximum of 9999.99
StartTime String No The start time of the service. If specified, the total quantity of the service is based on the end time subtracting the start time. Must be in the format of hh:mm. Required if no quantity has been specified. This is generally used for anesthesia or surgical assistant codes
EndTime String No The end time of the service. If specified, the total quantity of the service is based on the end time subtracting the start time. Must be in the format of hh:mm. Required if no quantity has been specified. This is generally used for anesthesia or surgical assistant codes
ParentServices String No A comma delimited string of parent service codes. This list is associated with the current service code wherein the code is a percentage premium. The codes in this list must be present and must have the same service date

Request Example:

{
“ClaimParameters”: {
“AdmissionDate”: null,
“ServiceLocationIndicator”: null,
“ReferringPhysician”: null,
“Payee”: “P”,
“MOHGroup”: null,
“LabLicense”: null,
“SpecialtyCode”: null,
“FacilityNumber”: null,
“FacilityDescription”: null,
“Status”: “SAVED”,
“ManualReview”: false
},
“ClaimPatientParameters”: {
“FirstName”: “createclaimtest”,
“LastName”: “mctest”,
“HealthCardNumber”: “6888899990”,
“VersionCode”: null,
“Province”: null,
“Gender”: “M”,
“DateOfBirth”: “1988-04-16T00:00:00”,
“MRNNumber”: null,
“PaymentProgram”: “HCP”
},
“ClaimServicesParameters”: [
{
“ServiceCode”: “A135A”,
“ServiceDate”: “2013-03-14T00:00:00”,
“DiagnosticCode”: “600”,
“Quantity”: 1,
“AddBasicUnits”: false,
“Fee”: null,
“StartTime”: null,
“EndTime”: null,
“ParentServices”: null
}
],
“BillingNumber”: “123456”,
“TokenId”: “9de25a64-4108-4e74-80d4-85b727e2c333”
}

Response Definition:

Parameter (s) Data Type Comment
ClaimId number The Id of the claim that was just created
PatientId number The Id of the patient that was just created

Response Example:

{
“PatientId”:123,
”ClaimId”:456
}

UpdateClaim

Back to Request Dictionary

Type: POST
URL: /ClaimAPI/UpdateClaim
Description: Updates an existing claim. Only claims with a status of saved or rejected can be updated

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician to which this claim belongs to
ClaimId Number Yes Claim Id of the claim to be updated
PatientId Number Yes The Id of the patient that this claim belongs to
AdmissionDate Date No The admission date of the patient for the claim. If it is sent, it must be in the format dd/mm/yyyy
ServiceLocationIndicator String No The service location indicator code for the claim. Accepted values are HDS, HED, HIP, HOP, HRP, OTN, IHF, OFF
ReferringPhysician String No The 6 digit number of the referring physician
Payee String Yes Must be P or S. For almost all claims, the value is generally P, which means payment to the physician. A value of S means payment to the Ministry of Health
MOHGroup String No The 4 character Ministry of Health assigned group
LabLicense String No The 4 character laboratory license
SpecialtyCode Number No The specialty code used for the claim. A specialty code is the two digit code that defines a physician’s discipline. For example, the value of 13 represents internal medicine. If no value is sent in, then the physician’s default specialty will be used
FacilityNumber Number No The Ministry of Health assigned facility number. This number is assigned to facilities recognized by the Ministry of Health (i.e hospitals, institutions, etc.). Not required if the patient was seen at a clinic
Status String Yes The status of the claim. Must be either SAVED (will not be submitted, but can be edited later) or SUBMIT (claim is ready to be submitted to the Ministry of Health)
ManualReview Boolean Yes A flag that indicates whether or not this claim needs to be manually reviewed by a claim assessor. For most claims, this value is false
Array of ClaimService items
ServiceCode String Yes The 5 character billing code associated with the claim. For example, A135A
ServiceDate Date Yes The date the service was performed. Must be in the format dd/mm/yyyy
DiagnosticCode String No The 3 or 4 character diagnostic code of the service. For example, 402
Quantity Number No The quantity this service was performed. This value required if no start and end time has been included. If a start time and end time have been included, this value must be blank. Must be a minimum of 1 to a maximum of 99
AddBasicUnits Boolean Yes A flag that determines if the basic units associated with the service code should be added to the total quantity. A value of true indicates that the basic units should be used and mdbilling will retrieve the associated basic units according to the code and add it to the quantity. This flag is generally associated with anesthesia or surgical assistant codes
Fee Number No The unit fee associated with the service. If no value is sent, then mdbilling.ca will retrieve the fee internally and use that value. Must be a minimum of 0.01 to a maximum of 9999.99
StartTime String No The start time of the service. If specified, the total quantity of the service is based on the end time subtracting the start time. Must be in the format of hh:mm. Required if no quantity has been specified. This is generally used for anesthesia or surgical assistant codes
EndTime String No The end time of the service. If specified, the total quantity of the service is based on the end time subtracting the start time. Must be in the format of hh:mm. Required if no quantity has been specified. This is generally used for anesthesia or surgical assistant codes
ParentServices String No A comma delimited string of parent service codes. This list is associated with the current service code wherein the code is a percentage premium. The codes in this list must be present and must have the same service date

Request Example:

{
“ClaimParameters”: {
“AdmissionDate”: null,
“ServiceLocationIndicator”: null,
“ReferringPhysician”: null,
“Payee”: “P”,
“MOHGroup”: null,
“LabLicense”: null,
“SpecialtyCode”: null,
“FacilityNumber”: null,
“FacilityDescription”: null,
“Status”: “SAVED”,
“ManualReview”: false
},
“PatientId”: 123,
“ClaimId”: 456,
“ClaimServicesParameters”: [
{
“ServiceCode”: “A133A”,
“ServiceDate”: “2013-03-14T00:00:00”,
“DiagnosticCode”: “600”,
“Quantity”: 1,
“AddBasicUnits”: false,
“Fee”: null,
“StartTime”: null,
“EndTime”: null,
“ParentServices”: null
}
],
“TokenId”: “9de25a64-4108-4e74-80d4-85b727e2c333”,
“BillingNumber”: “123456”
}

Response Definition:

Parameter (s) Data Type Comment
ClaimId number The Id of the claim that was just updated

Response Example:

{
“ClaimId”:456
}

DeleteClaim

Back to Request Dictionary

Type: POST
URL: /ClaimAPI/DeleteClaim
Description: Deletes an existing claim. Only claims with a status of saved or unsubmitted can be deleted

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician to which this claim belongs to
ClaimId Number Yes Claim Id of the claim to be deleted

Request Example:

{“ClaimId”:456,”BillingNumber”:”123456″,”TokenId”:”9de25a64-4108-4e74-80d4-85b727e2c333″}

Response Definition:

Parameter (s) Data Type Comment
IsClaimDeleted Boolean A flag that indicates if the claim was successfully deleted

Response Example:

{
“IsClaimDeleted”:true
}

FindClaims

Back to Request Dictionary

Type: GET
URL: /ClaimAPI/FindClaims
Description: Gets a list of claims based on search parameters. A maximum of 50 results are returned.

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician
AccountingId Number No Mdbilling.ca assigned accounting Id
PatientId Number No Id of a patient
ClaimStatus String No If included, must be one of the following values: saved, submitted, unsubmitted, paid, adjustedpayment, rejected or archived

Request Example:

/api/ClaimAPI/FindClaims?TokenId=9de25a64-4108-4e74-80d4-85b727e2c333&BillingNumber=123456&ClaimStatus=saved

Response Definition:

Parameter (s) Data Type Comment
Array of ClaimSearchResult items
ClaimId Number Id of the claim
AccountingId Number Accounting Id of the claim used by MOH to identify the claim
PatientId Number Id of the patient
PatientName String Name of the patient (first and last name)
MOHBatchNumber Number Only sent if the claim has a batch number assigned by the ministry
ClaimStatus String Status of the claim (i.e. Saved, Submitted)
ClaimValue Number Total value of the claim
ClaimDate Date Date of the claim based on the service dates. If there is more than one service date associated with the claim, the most recent date is used

Response Example:

{
“ClaimSearchResults”: [
{
“ClaimId”: 456,
“AccountingId”: 111,
“PatientId”: 123,
“PatientName”: “Doe, John”,
“MOHBatchNumber”: null,
“ClaimStatus”: “Saved”,
“ClaimValue”: 157,
“ClaimDate”: “2013-03-14T00:00:00”
},
{
“ClaimId”: 789,
“AccountingId”: 222,
“PatientId”: 369,
“PatientName”: “Smith, Adam”,
“MOHBatchNumber”: null,
“ClaimStatus”: “Saved”,
“ClaimValue”: 91.88,
“ClaimDate”: “2013-03-14T00:00:00”
}
]
}

GetClaimByClaimId

Back to Request Dictionary

Type: GET
URL: /ClaimAPI/GetClaimByClaimId
Description: Gets a claim by it’s Id.

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician
ClaimId Number Yes Id of the claim to be retrieved

Request Example:

/api/ClaimAPI/GetClaimByClaimId?TokenId=9de25a64-4108-4e74-80d4-85b727e2c333&BillingNumber=123456&ClaimId=456

Response Definition:

Parameter (s) Data Type Comment
ClaimParameters
ClaimId Number Id of the claim
AccountingId Number Accounting Id of the claim used by MOH to identify the claim
PatientId Number Id of the patient
AdmissionDate Date Admission date of the patient (may or may not be null depending on if the claim needs an admission date)
ServiceLocationIndicator String Service Location of the claim (may or may not be null depending on if the claim needs a service location)
ReferringPhysician String Billing number of the referring physician for the claim (may or may not be null depending on if the claim needs a referring physician)
Payee String Contains the value P or S depending on if the payment went to the physician or to MOH
MOHGroup String MOH group of the claim (may or may not be null depending on if the claim is billed under a group)
LabLicense String Lab license value of the claim (may or may not be null depending on if the claim needs a lab license)
SpecialtyCode Number Specialty Id of the physician (i.e. 13 for internal medicine)
FacilityNumber Number Facility number of facility submitted as part of the claim (may or may not be null depending on if the claim needs a facility)
FacilityDescription String Description of the facility (may or may not be null depending on if the claim needs a facility)
Status String Status of the claim (i.e. Saved, Submitted)
ManualReview Boolean True or false depending if the claim needs to be reviewed by a claim assessor
ClaimPatientParameters Number
FirstName String First name of the patient
LastName String Last name of the patient
HealthCardNumber String Health card number of the patient
PaymentProgram String Payment program of the patient
VersionCode String Version code of the patient
Province String Province of the patient (may or may not be null depending on if the patient is out of province i.e. RMB)
Gender String Gender of the patient. Either M or F
DateOfBirth Date Date of birth of the patient
MRNNumber String Represents the Medical Record Number of the hospital
Array of ClaimServicesParameters
ServiceCode String Service code of the service (i.e. A135A)
ServiceDate Date Service date of the service
DiagnosticCode String Diagnostic code of the service (may or may not be null depending on if the service requires a diagnostic code)
Quantity Number Quantity of the service
AddBasicUnits Boolean True or False depending on if basic units were added
Fee Number Fee value of the service based on a per unit basis
StartTime String Start time of the service
EndTime String End time of the service
AmountSubmitted Number Only shows with PAID and ADJUSTEDPAYMENT claims
AmountPaid Number Only shows with PAID and ADJUSTEDPAYMENT claims
PaymentDate Date Only shows with PAID and ADJUSTEDPAYMENT claims
ParentServices String Comma delimited list of parent service codes
RemittanceAdjustments Array of RemittanceAdjustment Only shows with ADJUSTEDPAYMENT claims. When doing calculations, these adjustments need to be applied to the AmountPaid value

Each RemittanceAdjustment consists of:

Amount (left blank if it was added by MOH)
AdjustmentDate
AdjustmentType


Response Example:

{
“ClaimParameters”: {
“ClaimId”: 456,
“AccountingId”: 111,
“PatientId”: 123,
“AdmissionDate”: null,
“ServiceLocationIndicator”: null,
“ReferringPhysician”: null,
“Payee”: “P”,
“MOHGroup”: null,
“LabLicense”: null,
“SpecialtyCode”: 3,
“FacilityNumber”: null,
“FacilityDescription”: null,
“Status”: “ADJUSTEDPAYMENT”,
“ManualReview”: false
},
“ClaimPatientParameters”: {
“PatientId”: 123,
“FirstName”: “John”,
“LastName”: “Doe”,
“HealthCardNumber”: “1234567890”,
“PaymentProgram”: “HCP”,
“VersionCode”: null,
“Province”: null,
“Gender”: “M”,
“DateOfBirth”: “1988-04-16T00:00:00”,
“MRNNumber”: null,
“LastReferringPhysician”: null
},
“ClaimServicesParameters”: [
{
“ServiceCode”: “A134A”,
“ServiceDate”: “2013-03-14T00:00:00”,
“DiagnosticCode”: “600”,
“Quantity”: 1,
“AddBasicUnits”: false,
“Fee”: 61.25,
“StartTime”: null,
“EndTime”: null,
“AmountSubmitted”: 100.00
“AmountPaid”: 100.00
“PaymentDate”: “2013-04-15T00:00:00”,
“ParentServices”: null
},
{
“ServiceCode”: “A133A”,
“ServiceDate”: “2013-03-14T00:00:00”,
“DiagnosticCode”: “600”,
“Quantity”: 1,
“AddBasicUnits”: false,
“Fee”: 79.85,
“StartTime”: null,
“EndTime”: null,
“AmountSubmitted”: 80.00
“AmountPaid”: 80.00
“PaymentDate”: “2013-04-15T00:00:00”,
“ParentServices”: null
“RemittanceAdjustments”: [
{
“Amount”: “”,
“AdjustmentDate”: “2013-05-15T00:00:00”,
“AdjustmentType”: “Service added by MOH”,
} ] },
{
“ServiceCode”: “E078A”,
“ServiceDate”: “2013-03-14T00:00:00”,
“DiagnosticCode”: “600”,
“Quantity”: 1,
“AddBasicUnits”: false,
“Fee”: 70.55,
“StartTime”: null,
“EndTime”: null,
“AmountSubmitted”: 80.00
“AmountPaid”: 20.00
“PaymentDate”: “2013-04-15T00:00:00”,
“ParentServices”: “A134A,A133A”
, “RemittanceAdjustments”: [
{
“Amount”: “30.00”,
“AdjustmentDate”: “2013-05-15T00:00:00”,
“AdjustmentType”: “Positive Adjustment”,
},
{
“Amount”: “-10.00”,
“AdjustmentDate”: “2013-06-15T00:00:00”,
“AdjustmentType”: “Negative Adjustment”,
} ]
}
]
}

GetQuantityFromTime

Back to Request Dictionary

Type: GET
URL: /ClaimAPI/GetQuantityFromTime
Description: Gets the quantity based on a start time, end time and a service code. Used for anesthesia and surgical assistant codes

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician
ServiceCode String Yes The 5 character service code to apply to calculate the start and end times against (i.e. A135A)
StartTime String Yes Start time of the service. Must be in the format hh:mm
EndTime String Yes End time of the service. Must be in the format hh:mm

Request Example:

/api/ClaimAPI/GetQuantityFromTime? TokenId=9de25a64-4108-4e74-80d4-85b727e2c333&BillingNumber=123456&ServiceCode=D001C&StartTime=09:00&EndTime=13:30

Response Definition:

Parameter (s) Data Type Comment
Quantity Number Number of units based on the time interval sent

Response Example:

{
“Quantity”:44
}

FindFacility

Back to Request Dictionary

Type: GET
URL: /ClaimAPI/FindFacility
Description: Retrieves Ministry of Health recognized facilities based on a search string

Request Definition:

Parameter (s) Data Type Required? Comment
TokenId GUID Yes mdbilling.ca assigned token
BillingNumber String Yes Billing number of the physician
FacilitySearchValue String Yes The search string to find facilities. Maximum of 100 characters

Request Example:

/api/ClaimAPI/FindFacility? TokenId=9de25a64-4108-4e74-80d4-85b727e2c333&BillingNumber=123456&FacilitySearchValue=sunny

Response Definition:

Parameter (s) Data Type Comment
Array of FacilityResult items
FacilityId Number Ministry of Health assigned facility identifier
FacilityDescription String Description of the facility. Mimics the same format used when searching a facility on mdbilling.ca’s site

Response Example:

{
“FacilityResults”: [
{
“FacilityId”: 1647,
“FacilityDescription”: “1647 SUNNYCREST NURSING HOME WHITBY (NH)”
},
{
“FacilityId”: 1923,
“FacilityDescription”: “1923 SUNNYSIDE HOME KITCHENER (HF)”
},
{
“FacilityId”: 2400,
“FacilityDescription”: “2400 SUNNYBROOK HEALTH SCIENCES CENTRE (NH)”
},
{
“FacilityId”: 3312,
“FacilityDescription”: “3312 SUNNYBROOK HEALTH SCIENCES CENTRE TORONTO (SO)”
},
{
“FacilityId”: 3936,
“FacilityDescription”: “3936 SUNNYBROOK HEALTH SCIENCES CENTRE TORONTO (AT)”
},
{
“FacilityId”: 3937,
“FacilityDescription”: “3937 SUNNYBROOK HEALTH SCIENCES CENTRE TORONTO (CR)”
},
{
“FacilityId”: 3939,
“FacilityDescription”: “3939 SUNNYBROOK HEALTH SCIENCES CENTRE TORONTO (CR)”
},
{
“FacilityId”: 4205,
“FacilityDescription”: “4205 SUNNYBROOK HEALTH SCIENCES CENTRE TORONTO (AM)”
},
{
“FacilityId”: 4273,
“FacilityDescription”: “4273 SUNNYBROOK HEALTH SCIENCES CENTRE TORONTO (GR)”
},
{
“FacilityId”: 4274,
“FacilityDescription”: “4274 SUNNYBROOK HEALTH SCIENCES CENTRE-ORTHOP TORONTO (GR)”
},
{
“FacilityId”: 4577,
“FacilityDescription”: “4577 SUNNYBROOK HEALTH SCIENCES CENTRE TORONTO (MH)”
}
]
}

Errors

Back to Request Dictionary

For any request, a list of errors can be sent back under the following reasons:

Incorrect data format

Failed validation

Errors are returned with a HTTP Bad Request code with the following format:

Response Definition:

Parameter (s) Data Type Comment
Array of Strings
Error-[X] String Combination of error number sequence and message