Developer API – British Columbia

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 MSP 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 an HTTPS connection. Sample use cases are:

  • Focus on your EMR software application, not on the continuous changes with MSP 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 [email protected]

All API access is customized to our client’s requirements.

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. The 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 were:

john.doe:abc123

The base 64 encoded string would be:

“Authorization: Basic am9obi5kb2U6YWJjMTIz ”

RESPONSE FORMAT: MDBilling.ca API requests use 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: All of our API requests are customized to our client’s requirements. The dictionary below is a sample that may be applicable to you.

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:

sdsd
Parameter (s)Data TypeRequired?Comment
TokenIdDescriptionSubtotal:$1.00
BillingNumberDescriptionSubtotal:$1.00
FirstNameDescriptionSubtotal:$1.00
LastNameDescriptionSubtotal:$1.00
HealthCardNumberDescriptionSubtotal:$1.00
PaymentProgramDescriptionSubtotal:$1.00
VersionCodeDescriptionDiscount:$2.00
ProvinceDescriptionShipping:$3.00
GenderDescriptionTax:$4.00
DateOfBirthDescriptionSubtotal:$1.00
MRNNumberDescriptionSubtotal:$1.00

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 TypeComment
PatientIdnumberThe 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 TypeRequired?Comment
PatientIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician to which this patient belongs to
PatientIdnumberYesThe Patient Id of the patient to be updated
FirstNameStringYesMaximum of 50 characters
LastNameStringYesMaximum of 50 characters
HealthCardNumberStringYesHealthcard 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
PaymentProgramStringYesMust be one of the following values: HCP (most common), WCB (Worker’s Compensation Board) or RMB (Reciprocal Medical Billing. Represents non-Ontario patients)
VersionCodeStringNoVersion code of the Ontario health card if the health card has one. Must be one or two characters in length (i.e. FF)
ProvinceStringNoNot 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
GenderStringYesMust be either M (Male) or F (Female)
DateOfBirthDateYesDate of birth of the patient. Must be in the format of dd/mm/yyyy
MRNNumberStringNoRepresents 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 TypeComment
PatientIdNumberThe 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 TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician to which this patient belongs to
PatientIdnumberYesThe 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 TypeComment
IsPatientDeletedBooleanA flag that indicates if the patient was successfully deleted

Request Example:

{“IsPatientDeleted”:true}

GetPatientById Back to Request Dictionary

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

Request Definition:

Parameter (s)Data TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician to which this patient belongs to
PatientIdNumberYesThe 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 TypeComment
PatientIdNumber
FirstNameString
LastNameString
HealthCardNumberString
PaymentProgramString
VersionCodeString
ProvinceStringContains null if the patient is from Ontario
GenderString
DateOfBirthDate
MRNNumberString
LastReferringPhysicianStringIt 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 TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician to which this patient belongs to
MOHGroupStringYesMinistry 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 TypeComment
IsMOHGroupCreatedBooleanA 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 physician’s Ministry of Health groups

Request Definition:

Parameter (s)Data Type Required?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician

Request Example:

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

Response definition:

Parameter (s)Data TypeComment
Array of UserMOHGroup items:
MOHGroupString

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 TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician to which this Ministry of Health group belongs to
MOHGroupStringYesMinistry 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 TypeComment
IsMOHGroupDeletedBooleanA 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 TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician to which this claim belongs to
PatientIdNumberYesThe Id of the patient that this claim belongs to
AdmissionDateDateNoThe admission date of the patient for the claim. If it is sent, it must be in the format dd/mm/yyyy
ServiceLocationIndicatorStringNoThe service location indicator code for the claim. Accepted values are HDS, HED, HIP, HOP, HRP, OTN, IHF, OFF
ReferringPhysicianStringNoThe 6 digit number of the referring physician
PayeeStringYesMust be P or S. For almost all claims, the value is generally P, which means a payment to the physician. A value of S means a payment to the Ministry of Health
MOHGroupStringNoThe 4 character Ministry of Health assigned group
LabLicenseStringNoThe 4 character laboratory license
SpecialtyCodeNumberNoThe specialty code used for the claim. A specialty code is a 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
FacilityNumberNumberNoThe 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
StatusStringYesThe status of the claim. Must be either SAVED (will not be submitted, but can be edited later) or SUBMIT (the claim is ready to be submitted to the Ministry of Health)
ManualReviewBooleanYesA 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
ServiceCodeStringYesThe 5 character billing code associated with the claim. For example, A135A
ServiceDateDateYesThe date the service was performed. Must be in the format dd/mm/yyyy
DiagnosticCodeStringNoThe 3 or 4 characters diagnostic code of the service. For example, 402
QuantityNumberNoThe quantity of 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
AddBasicUnitsBooleanYesA 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.ca 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
FeeNumberNoThe 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
StartTimeStringNoThe 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
EndTimeStringNoThe 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
ParentServicesStringNoA 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 TypeComment
ClaimIdNumberThe Id of the claim that was just created

Response Example:

{“ClaimId”:456}

CreateClaimWithPatient Back to Request Dictionary

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

Request Definition:

Parameter (s)Data TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician to which this claim belongs to
PatientIdNumberYesThe Id of the patient that this claim belongs to
ClaimPatientParameters
FirstNameStringYesMaximum of 50 characters
LastNameStringYesMaximum of 50 characters
HealthCardNumberStringYesHealthcard 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
PaymentProgramStringYesMust be one of the following values: HCP (most common), WCB (Worker’s Compensation Board) or RMB (Reciprocal Medical Billing. Represents non-Ontario patients)
VersionCodeStringNoVersion code of the Ontario health card if the health card has one. Must be one or two characters in length (i.e. FF)
ProvinceStringNoNot 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
GenderStringYesMust be either M (Male) or F (Female)
DateOfBirthdateYesDate of birth of the patient. Must be in the format of dd/mm/yyyy
MRNNumberStringNoRepresents the Medical Record Number of the hospital. Can be a maximum of 15 characters
ClaimParameters
AdmissionDateDateNoThe admission date of the patient for the claim. If it is sent, it must be in the format dd/mm/yyyy
ServiceLocationIndicatorStringNoThe service location indicator code for the claim. Accepted values are HDS, HED, HIP, HOP, HRP, OTN, IHF, OFF
ReferringPhysicianStringNoThe 6 digit number of the referring physician
PayeeStringYesMust be P or S. For almost all claims, the value is generally P, which means a payment to the physician. A value of S means a payment to the Ministry of Health
MOHGroupStringNoThe 4 character Ministry of Health assigned group
LabLicenseStringNoThe 4 character laboratory license
SpecialtyCodeNumberNoThe specialty code used for the claim. A specialty code is a 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
FacilityNumberNumberNoThe 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
StatusStringYesThe status of the claim. Must be either SAVED (will not be submitted, but can be edited later) or SUBMIT (the claim is ready to be submitted to the Ministry of Health)
ManualReviewBooleanYesA 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
ServiceCodeStringYesThe 5 character billing code associated with the claim. For example, A135A
ServiceDateDateYesThe date the service was performed. Must be in the format dd/mm/yyyy
DiagnosticCodeStringNoThe 3 or 4 characters diagnostic code of the service. For example, 402
QuantityNumberNoThe quantity of 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
AddBasicUnitsBooleanYesA 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.ca 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
FeeNumberNoThe 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
StartTimeStringNoThe 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
EndTimeStringNoThe 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
ParentServicesStringNoA 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 TypeComment
ClaimIdnumberThe Id of the claim that was just created
PatientIdnumberThe Id of the patient that was just created

Response Example:

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

UpdateClaimBack 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 TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician to which this claim belongs to
ClaimIdNumberYesClaim Id of the claim to be updated
PatientIdNumberYesThe Id of the patient that this claim belongs to
AdmissionDateDateNoThe admission date of the patient for the claim. If it is sent, it must be in the format dd/mm/yyyy
ServiceLocationIndicatorStringNoThe service location indicator code for the claim. Accepted values are HDS, HED, HIP, HOP, HRP, OTN, IHF, OFF
ReferringPhysicianStringNoThe 6 digit number of the referring physician
PayeeStringYesMust be P or S. For almost all claims, the value is generally P, which means a payment to the physician. A value of S means a payment to the Ministry of Health
MOHGroupStringNoThe 4 character Ministry of Health assigned group
LabLicenseStringNoThe 4 character laboratory license
SpecialtyCodeNumberNoThe specialty code used for the claim. A specialty code is a 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
FacilityNumberNumberNoThe 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
StatusStringYesThe status of the claim. Must be either SAVED (will not be submitted, but can be edited later) or SUBMIT (the claim is ready to be submitted to the Ministry of Health)
ManualReviewBooleanYesA 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
ServiceCodeStringYesThe 5 character billing code associated with the claim. For example, A135A
ServiceDateDateYesThe date the service was performed. Must be in the format dd/mm/yyyy
DiagnosticCodeStringNoThe 3 or 4 characters diagnostic code of the service. For example, 402
QuantityNumberNoThe quantity of 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
AddBasicUnitsBooleanYesA 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.ca 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
FeeNumberNoThe 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
StartTimeStringNoThe 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
EndTimeStringNoThe 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
ParentServicesStringNoA 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 TypeComment
ClaimIdnumberThe 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 TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician to which this claim belongs to
ClaimIdNumberYesClaim Id of the claim to be deleted

Request Example:

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

Response definition:

Parameter (s)Data TypeComment
IsClaimDeletedBooleanA flag that indicates if the claim was successfully deleted

Response Example:

{“IsClaimDeleted”:true}

FindClaimsBack 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 TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician
AccountingIdNumberNoMdbilling.ca assigned accounting Id
PatientIdNumberNoId of a patient
ClaimStatusStringNoIf included, must be one of the following values: saved, submitted, unsubmitted, paid, adjusted payment, rejected or archived

Request Example:

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

Response definition:

Parameter (s)Data TypeComment
Array of ClaimSearchResult items
ClaimIdNumber
AccountingIdNumber
PatientIdNumber
PatientNameString
MOHBatchNumberNumberOnly sent if the claim has a batch number assigned by the ministry
ClaimStatusString
ClaimValueNumberThe total value of the claim
ClaimDateDateDate 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”
}
]
}

GetClaimByClaimIdBack to Request Dictionary

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

Request Definition:

Parameter (s)Data TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician
ClaimIdNumberYesId 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 TypeComment
ClaimParameters
ClaimIdNumber
AccountingIdNumber
PatientIdNumber
AdmissionDateDate
ServiceLocationIndicatorString
ReferringPhysicianString
PayeeString
MOHGroupString
LabLicenseString
SpecialtyCodeNumber
FacilityNumberNumber
FacilityDescriptionString
StatusString
ManualReviewBoolean
ClaimPatientParametersNumber
FirstNameString
LastNameString
HealthCardNumberString
PaymentProgramString
VersionCodeString
ProvinceString
GenderString
DateOfBirthDate
MRNNumberString
Array of ClaimServicesParameters
ServiceCodeString
ServiceDateDate
DiagnosticCodeString
QuantityNumber
AddBasicUnitsBoolean
FeeNumber
StartTimeString
EndTimeString
AmountSubmittedNumberOnly shows with PAID and ADJUSTEDPAYMENT claims
AmountPaidNumberOnly shows with PAID and ADJUSTEDPAYMENT claims
PaymentDateDateOnly shows with PAID and ADJUSTEDPAYMENT claims
ParentServicesStringComma-delimited list of parent service codes
RemittanceAdjustmentsArray of RemittanceAdjustmentOnly 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”,
} ]
}
]
}

GetQuantityFromTimeBack 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 TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician
ServiceCodeStringYesThe 5 character service code to apply to calculate the start and end times against
StartTimeStringYesStart time of the service. Must be in the format hh:mm
EndTimeStringYesThe 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 TypeComment
QuantityNumber

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 TypeRequired?Comment
TokenIdGUIDYesmdbilling.ca assigned token
BillingNumberStringYesBilling number of the physician
FacilitySearchValueStringYesThe 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 TypeComment
Array of FacilityResult items
FacilityIdNumberMinistry of Health assigned facility identifier
FacilityDescriptionStringDescription 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)”
}
]
}

ErrorsBack 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 an HTTP Bad Request code with the following format:

Response definition:

Parameter (s)Data TypeComment
Array of Strings
Error-[X]StringCombination of error number sequence and message