APIs
This page provides information about the APIs in Komodo Care Connect that you can call and use.
The eRX API (PJN_ErxApi
) is a RESTful web service for enrolling patients into care programs. For more information, reference Create a care plan from an eRX API call.
/services/apexrest/mvn/eRxApi
Methods
doPost()
/services/apexrest/mvn/eRxApi
This is the POST method that sends Komodo Care Connect the information to enroll a patient into a care program. A JSON payload must be passed with the following attributes to upsert records into Komodo Care Connect:
Key/Object | Data type | Required? | Description |
---|---|---|---|
vendorName | string | ✓ | The name of the vendor. This must match the API name of an existing eRX Vendor ( |
programName | string | ✓ | The name of the care program. This must match the API name of an existing Program ( |
enrollmentDate | string | ✓ | The date that the patient is enrolled into the care program. This is used to generate a unique external ID for the Care Plan ( |
patient | object | ✓ | The details about the patient. This is mapped to the Patient ( |
physician | object | The details about the physician. This is mapped to the Physician ( | |
staff | object | The details about a staff member. This is mapped to the Staff ( | |
caregiver | object | The details about a caregiver. This is mapped to the Caregiver ( | |
pharmacy | object | The details about a pharmacy. This is mapped to the Pharmacy ( | |
organization | object | The details about an organization. This is mapped to the Organization ( | |
consents | object | The details about one or more consents. This is mapped to the Consent ( | |
insurances | object | The details about one or more insurance plans. This is mapped to the Member Plan ( | |
prescriptions | object | The details about one or more prescriptions. This is mapped to the Prescription ( NoteThe Pharmacy ( | |
additionalObjects | object | Additional details to be mapped to any object defined on the eRX Object ( |
Key/Object | Data type | Length | Required? | Record type(s) | Mapped field |
---|---|---|---|---|---|
id | string | 50 | ✓ | All Account and Person Account record types | Source System ID ( |
name | string | 50 |
| Pharmacy ( Organization ( | Name ( |
firstName | string | 50 |
| All Person Account record types | First Name ( |
middleName | string | 50 |
| All Person Account record types | Middle Name ( |
lastName | string | 50 | ✓ | All Person Account record types | Last Name ( |
gender | string | 1 |
| All Person Account record types | Gender ( |
dateOfBirth | string (in | 10 |
| All Person Account record types | Birthdate ( |
specialty | string | 50 |
| Physician ( | Specialty ( |
suffix | string | 5 |
| Physician ( | Suffix ( |
npi | string | 50 |
| Physician ( Pharmacy ( Organization ( | NPI ( |
addresses | object | N/A | All Account and Person Account record types | N/A. The related Contact Information record(s) will be created. For more information about this object in the JSON payload, reference Table 148, “JSON payload - Contact Information object” below. (Similar keys and objects are used for all Contact Information records in the JSON payload, but not every key and object are required or used for every record type.) | |
phones | object | N/A | All Account and Person Account record types | N/A. The related Contact Information record(s) will be created. For more information about this object in the JSON payload, reference Table 148, “JSON payload - Contact Information object” below. (Similar keys and objects are used for all Contact Information records in the JSON payload, but not every key and object are required or used for every record type.) | |
emails | object | N/A | All Account and Person Account record types | N/A. The related Contact Information record(s) will be created. For more information about this object in the JSON payload, reference Table 148, “JSON payload - Contact Information object” below. (Similar keys and objects are used for all Contact Information records in the JSON payload, but not every key and object are required or used for every record type.) | |
faxes | object | N/A | All Account and Person Account record types | N/A. The related Contact Information record(s) will be created. For more information about this object in the JSON payload, reference Table 148, “JSON payload - Contact Information object” below. (Similar keys and objects are used for all Contact Information records in the JSON payload, but not every key and object are required or used for every record type.) | |
additionalFields | object | N/A |
| All Account and Person Account record types | N/A. This depends on what objects and fields are defined on the eRX Object ( |
Key/Object | Data type | Length | Required? | Record type(s) | Mapped field |
---|---|---|---|---|---|
id | string | 50 | ✓ | All Contact Information record types | External ID ( |
addressLine1 | string | 50 | ✓ | Address ( | Address Line 1 ( |
addressLine2 | string | 50 |
| Address ( | Address Line 2 ( |
city | string | 10 | ✓ | Address ( | City ( |
state | string | 2 | ✓ | Address ( | State ( |
postalCode | string | 10 | ✓ | Address ( | Postal Code ( |
country | string | 2 | ✓ | Address ( | Country ( |
countryCode | string | 5 | ✓ | Phone ( Fax ( | Phone ( Fax ( |
phoneNumber | string | 12 | ✓ | Phone ( | Phone ( NoteThe final value that is stamped on the Phone field is the concatenation of countryCode and phoneNumber. |
faxNumber | string | 12 | ✓ | Fax ( | Fax ( NoteThe final value that is stamped on the Phone field is the concatenation of countryCode and faxNumber. |
ext | string | 5 | Phone ( Fax ( | Extension Number ( | |
emailAddress | string | 50 | ✓ | Email ( | Email ( |
type | string | 7 | ✓ | All Contact Information record types | Type ( |
primary | boolean | N/A |
| All Contact Information record types | Set as Primary ( |
additionalFields | object | N/A |
| All Contact Information record types | N/A. This depends on what objects and fields are defined on the eRX Object ( |
Key/Object | Data type | Length | Required? | Mapped field |
---|---|---|---|---|
id | string | 50 | ✓ | External Id ( |
name | string | 50 | ✓ | Data Use Purpose ( NoteThe string in the JSON payload must contain the External Id ( |
effectiveDate | string (in | 10 | Effective From ( | |
expirationDate | string (in | 10 | Effective To ( | |
additionalFields | object | N/A | N/A. This depends on what objects and fields are defined on the eRX Object ( |
Key/Object | Data type | Length | Required? | Mapped field |
---|---|---|---|---|
id | string | 50 | External Id ( | |
relationshipToMember | string | 255 | Relationship to Cardholder ( | |
effectiveDate | string (in | 10 | Effective Date ( | |
expirationDate | string (in yyyy-mm-dd format) | 10 | Expiration Date ( | |
companyName | string | 255 | Payer Name ( | |
groupName | string | 64 | Group ( | |
memberNumber | string | 64 | Insurance ID ( | |
policyHolderFirstName | string | Reference note. | Cardholder Name ( NoteThe final value that is stamped on the Cardholder Name field is the concatenation of policyHolderFirstName and policyHolderLastName with a space in between. Since the maximum length of the Cardholder Name value is 50, the maximum length of policyHolderFirstName and policyHolderLastName together is 49. | |
policyHolderLastName | string | Reference note. | ||
additionalFields | object | N/A | N/A. This depends on what objects and fields are defined on the eRX Object ( |
Key/Object | Data type | Length | Required? | Mapped field |
---|---|---|---|---|
id | string | 50 | ✓ | External Id ( |
drugNdc | string | 50 | ✓ | Product ( NoteThe string in the JSON payload must contain the ID of an existing Care Program Product ( |
quantity | string | 50 | Quantity ( | |
numberOfRefills | integer | 5 | Number of Refills ( | |
additionalFields | object | N/A | N/A. This depends on what objects and fields are defined on the eRX Object ( |
This is a sample JSON payload that can be passed in as the request body for the POST method of the eRX API. It includes additional object and field keys that have been configured in the examples in Create a care plan from an eRX API call.
{ "vendorName": "MVN_KTX_VENDOR", "programName": "MVN_KTX", "enrollmentDate": "2021-04-29", "patient": { "id": "b479cd2d-45e2-416a-87a3-80612823eccf", "firstName": "John", "middleName": "D", "lastName": "Doe", "gender": "Male", "dateOfBirth": "1984-01-01", "addresses": [ { "id": "f4ba3293-d975-40cb-9811-7e90b4abd369", "addressLine1": "1234 Street Road", "addressLine2": "Apt 12", "city": "Orlando", "state": "FL", "postalCode": "32818", "country": "United States", "type": "Mailing", "primary": true, "additionalFields": { "closestCity": "Orlando" } } ], "phones": [ { "id": "f35652e8-b6f9-44f0-a89f-18b8b28d951c", "phoneNumber": "555-123-4563", "ext": "x123", "countryCode": "+1", "type": "Mobile", "primary": true } ], "faxes": [ { "id": "8498f034-afb9-4d3b-bd69-b77e86d855b7", "faxNumber": "555-323-4567", "countryCode": "+1", "type": "Home", "primary": true } ], "emails": [ { "id": "f6d1b169-3714-4531-a9b6-465de46d5efa", "emailAddress": "jdoe@gmail.com", "type": "Personal", "primary": true } ] }, "physician": { "id": "d69b63de-a67f-4133c-94e6-d6c3a3563d90", "firstName": "Will", "middleName": "", "lastName": "GOMEZ", "specialty": "", "suffix": "MD", "npi": "1003000100", "addresses": [ { "id": "a21e8e0d-d871-4165-9b18-c4acfaff26b4", "addressLine1": "1234 Street Road", "addressLine2": "Apt 12", "city": "Orlando", "state": "FL", "postalCode": "32818", "country": "United States", "type": "Mailing", "primary": true } ], "phones": [ { "id": "fbf6a3c8-4fd8-4d72-b579-efd44eb61c19", "phoneNumber": "555-123-d4567", "ext": "x123", "countryCode": "+1", "type": "Mobile", "primary": true } ], "faxes": [ { "id": "8498f034-afb9-4d3b-bd69-b77e86d855b8", "faxNumber": "555-323-4568", "countryCode": "+1", "type": "Work", "primary": true } ], "emails": [ { "id": "8e551c22-9037-453c-a7f2-2619a4d5a3a3", "emailAddress": "jdoe@gmail.com", "type": "Work", "primary": true } ] }, "caregiver": { "id": "035fe461-121d-4cde-a728-b7fa9a024045", "firstName": "Jane", "middleName": "", "lastName": "Doe", "addresses": [ { "id": "bdc4d596-10dc-47e9-bed5-ade1650d0b34", "addressLine1": "1234 Street Road", "addressLine2": "Apt 12", "city": "Orlando", "state": "FL", "postalCode": "32818", "country": "United States", "type": "Mailing", "primary": true } ], "phones": [ { "id": "ae48a02d-75ca-4e89-b53d-2f662ba66cd0", "phoneNumber": "555-123-d4567", "ext": "x123", "countryCode": "+1", "type": "Mobile", "primary": true } ], "faxes": [ { "id": "8498f034-afb9-4d3b-bd69-b77e86d85538", "faxNumber": "555-323-4569", "countryCode": "+1", "type": "Work", "primary": true } ], "emails": [ { "id": "e1feaa53-ecd1-410f-b0e5-3b1db663253f", "emailAddress": "jdoe@gmail.com", "type": "Work", "primary": true } ] }, "staff": { "id": "55b41576-f28b-48b8-b2e7-5b3604752f36", "firstName": "George", "middleName": "", "lastName": "Thomas", "addresses": [ { "id": "6dea4c27-5e2c-4b98-b904-260713dd814d", "addressLine1": "1234 Street Road", "addressLine2": "Apt 12", "city": "Orlando", "state": "FL", "postalCode": "32818", "country": "United States", "type": "Mailing", "primary": true } ], "phones": [ { "id": "f4e8e7b0-6bd7-466b-a240-dbc01de38b40", "phoneNumber": "555-123-d4567", "ext": "x123", "countryCode": "+1", "type": "Mobile", "primary": true } ], "faxes": [ { "id": "8498f034-afb9-4d3b-bd69-b77e86d85539", "faxNumber": "555-323-4560", "countryCode": "+1", "type": "Work", "primary": true } ], "emails": [ { "id": "fd50064a-db1f-4689-b9ff-c08689b37ad9", "emailAddress": "jdoe@gmail.com", "type": "Work", "primary": true } ] }, "pharmacy": { "id": "796cg7346-9ba7-4c20-bbdf-4d814cbea2c6", "name": "WALGREENS DRUG STORE #04589", "npi": "1720093031", "addresses": [ { "id": "c343dfb3-91f8-4051-a441-6c16088ede45", "addressLine1": "1234 Street Road", "addressLine2": "Apt 12", "city": "Orlando", "state": "FL", "postalCode": "32818", "country": "United States", "type": "Mailing", "primary": true } ], "phones": [ { "id": "40dc7f4c-4ee9-440a-9635-fc1efaa54f0d", "phoneNumber": "555-123-d4567", "ext": "x123", "countryCode": "+1", "type": "Mobile", "primary": true } ], "faxes": [ { "id": "8498f034-afb9-4d3b-bd69-b77e86d85889", "faxNumber": "555-323-4510", "countryCode": "+1", "type": "Work", "primary": true } ], "emails": [ { "id": "26c95c08-5416-4902-b264-7e3ca1b1039a", "emailAddress": "wal@greens.com", "type": "Work", "primary": true } ] }, "organization": { "id": "797cg6346-9ba7-4c20-bbdf-4d814cbea2c6", "name": "Mayo Clinic", "npi": "1720093091", "addresses": [ { "id": "7e1a52b7-dddd-432c-9f10-698d8d4d1814", "addressLine1": "1234 Street Road", "addressLine2": "Apt 12", "city": "Orlando", "state": "FL", "postalCode": "32818", "country": "United States", "type": "Mailing", "primary": true } ], "phones": [ { "id": "8b067d9d-65ca-46ba-9061-d2c1183694cf", "phoneNumber": "555-123-d4567", "ext": "x123", "countryCode": "+1", "type": "Mobile", "primary": true } ], "faxes": [ { "id": "8498f034-afb9-4d3b-bd69-b77e86d85389", "faxNumber": "555-323-4520", "countryCode": "+1", "type": "Work", "primary": true } ], "emails": [ { "id": "1dfd2b90-0f40-4c0a-be14-4a7fa783327a", "emailAddress": "mayo@clinic.com", "type": "Work", "primary": true } ] }, "consents": [ { "id": "7e5d030f-9479-4519-9bb7-468308603072", "name": "MVN_KTX_HIPAA", "effectiveDate": "2021-04-29", "expirationDate": "2022-04-29" } ], "insurances": [ { "id": "42b44f52e-7f6e-42be-930d-10c1215e9d8", "relationshipToMember": "Self", "effectiveDate": "2020-01-01", "expirationDate": "2022-01-01", "companyName": "AETNA", "groupNumber": "123456", "memberNumber": "ABC12345678", "policyHolderFirstName": "JOHN", "policyHolderLastName": "DOE" } ], "prescriptions": [ { "id": "7e5d030f-9479-4519-9bb7-468308603072", "drugNdc": "0123456789", "quantity": 3, "numberOfRefills": 2 } ], "additionalObjects": [ { "objectName": "mvn__PJN_Assistance_Program__c", "records": [ { "recordType": "PJN_Patient_Assistance_Program", "additionalFields": { "householdIncome": 75000, "householdSize": 3 } } ] } ] }
Status code | Description |
---|---|
200 | The API call was a success, and the information submitted will be updated on the respective record(s). |
400 | The API call failed because the request body is invalid or missing. |
500 | The API call failed because there is a server side error. |
The Missing Information Request API (PJN_MissingInformationRequestApi
) is a RESTful web service for requesting and submitting information that is missing. Each API call is tracked in a Request History (mvn__PJN_Request_History__c
) record for the given Data Request (mvn__PJN_Data_Request__c
) record. For more information, reference Request for missing information.
/services/apexrest/mvn/missingInformationRequest/{UUID}
Methods
doGet()
/services/apexrest/mvn/missingInformationRequest/{UUID}
This is the GET method that returns a list of fields whose missing information are requested for. The details of the request are retrieved from a given Data Request (mvn__PJN_Data_Request__c
) record.
Parameter | Type | Description |
---|---|---|
UUID | String | The UUID ( |
{ "uuid": "ced654cd-6af2-4577-bdd4-b3f454819998", "fields": [ { "uuid": "717abada-9b65-49aa-bc37-ffe164088005", "type": "STRING", "scale": null, "length": null, "label": "Contact Information: Address Line 2" }, { "uuid": "3092db90-0616-489e-ad81-3155b386be11", "type": "DATE", "scale": null, "length": null, "label": "Patient: Date of Birth" } ], "expirationDate": "2024-11-01", "drugProgram": "Kalytex" }
Status code | Description |
---|---|
200 | The API call was a success, and you will receive a JSON object with the details of the missing information request. |
400 | The API call failed because the UUID is either invalid or missing. |
403 | The API call failed because the user calling the API does not have access to an object or field. |
404 | The API call failed because the request for missing information could not be found. This could be because the Care Plan record, the Care Program record, the Data Request record, the Missing Information Group metadata record, and/or the patient's Account record is missing. |
409 | The API call failed because the request for missing information is no longer active. This could be because the Status ( |
500 | The API call failed because there is a server side error. |
doPost()
/services/apexrest/mvn/missingInformationRequest/{UUID}
This is the POST method that submits information that was missing and has been requested for.
Parameter | Type | Description |
---|---|---|
UUID | String | The UUID ( |
[ { "uuid": "717abada-9b65-49aa-bc37-ffe164088005", "type": "STRING", "scale": null, "length": null, "label": "Contact Information: Address Line 2", "value": "Apt #5B" }, { "uuid": "3092db90-0616-489e-ad81-3155b386be11", "type": "DATE", "scale": null, "length": null, "label": "Patient: Date of Birth", "value": "1991-05-07" } ]
Status code | Description |
---|---|
200 | The API call was a success, and the information submitted will be updated on the respective record(s). |
400 | The API call failed because either the UUID or the request body is invalid or missing. |
403 | The API call failed because the user calling the API does not have access to an object or field. |
404 | The API call failed because the request for missing information could not be found. This could be because the Care Plan record, the Care Program record, the Data Request record, the Missing Information Group metadata record, and/or the patient's Account record is missing. |
409 | The API call failed because the request for missing information is no longer active. This could be because the Status ( |
412 | The API call failed because the information submitted does not fulfill the field(s) whose information is requested for. |
500 | The API call failed because there is a server side error. |