Skip to content

Latest commit

 

History

History
912 lines (635 loc) · 9.93 KB

reference.md

File metadata and controls

912 lines (635 loc) · 9.93 KB

Reference

Eligibility

client.eligibility.get({ ...params }) -> ReferralExchange.EligibilityRes

🔌 Usage

await client.eligibility.get({
    uin: "uin",
    offeringId: "offeringId",
});

⚙️ Parameters

request: ReferralExchange.EligibilityGetRequest

requestOptions: Eligibility.RequestOptions

Referrals

client.referrals.list({ ...params }) -> ReferralExchange.PaginatedReferralsDto

🔌 Usage

await client.referrals.list({
    hciCode: "hciCode",
});

⚙️ Parameters

request: ReferralExchange.ReferralsListRequest

requestOptions: Referrals.RequestOptions

client.referrals.upsert({ ...params }) -> ReferralExchange.ReferralDto

🔌 Usage

await client.referrals.upsert({
    patient: {
        uin: "uin",
        name: "name",
        phoneNumber: "91234567",
        dob: "1990-01-01",
        gender: "Male",
    },
    offeringId: "offeringId",
    senderHciCode: "senderHciCode",
    senderInstitutionName: "senderInstitutionName",
    doctorMcr: "doctorMcr",
    doctorName: "doctorName",
    doctorEmail: "doctorEmail",
    doctorContactNumber: "doctorContactNumber",
    isSubsidised: true,
    isUrgent: true,
    isDraft: true,
    formResponses: [
        {
            question: "question",
            id: "id",
            answer: "answer",
        },
    ],
});

⚙️ Parameters

request: ReferralExchange.CreateReferralReq

requestOptions: Referrals.RequestOptions

client.referrals.get(referralId, { ...params }) -> ReferralExchange.FullReferralDto

🔌 Usage

await client.referrals.get("referralId");

⚙️ Parameters

referralId: string — Referral ID

request: ReferralExchange.ReferralsGetRequest

requestOptions: Referrals.RequestOptions

client.referrals.delete(referralId) -> ReferralExchange.ReferralDto

🔌 Usage

await client.referrals.delete("referralId");

⚙️ Parameters

referralId: string — Referral ID

requestOptions: Referrals.RequestOptions

client.referrals.cancel(referralId, { ...params }) -> ReferralExchange.ReferralDto

🔌 Usage

await client.referrals.cancel("referralId");

⚙️ Parameters

referralId: string — Referral ID

request: ReferralExchange.CancelReferralReq

requestOptions: Referrals.RequestOptions

client.referrals.amend(referralId, { ...params }) -> ReferralExchange.ReferralDto

🔌 Usage

await client.referrals.amend("referralId", {
    timeslotStartAt: 1714857600000,
});

⚙️ Parameters

referralId: string — Referral ID

request: ReferralExchange.AmendReferralReq

requestOptions: Referrals.RequestOptions

client.referrals.accept(referralId, { ...params }) -> void

🔌 Usage

await client.referrals.accept("referralId", {
    appointmentTime: 1714857600000,
});

⚙️ Parameters

referralId: string — Referral ID

request: ReferralExchange.EaConfirmReferralBody

requestOptions: Referrals.RequestOptions

client.referrals.reject(referralId, { ...params }) -> void

🔌 Usage

await client.referrals.reject("referralId", {
    rejectionMessage: "rejectionMessage",
});

⚙️ Parameters

referralId: string — Referral ID

request: ReferralExchange.EaRejectReferralBody

requestOptions: Referrals.RequestOptions

client.referrals.backToDraft(referralId) -> ReferralExchange.ReferralDto

🔌 Usage

await client.referrals.backToDraft("referralId");

⚙️ Parameters

referralId: string — Referral ID

requestOptions: Referrals.RequestOptions

Notes

client.notes.create(referralId, { ...params }) -> ReferralExchange.NoteDto

🔌 Usage

await client.notes.create("referralId", {
    authorHciCode: "authorHciCode",
});

⚙️ Parameters

referralId: string — Referral ID

request: ReferralExchange.CreateNoteReq

requestOptions: Notes.RequestOptions

Offerings

client.offerings.list() -> ReferralExchange.OfferingDto[]

🔌 Usage

await client.offerings.list();

⚙️ Parameters

requestOptions: Offerings.RequestOptions

client.offerings.listTimeslots(offeringId, { ...params }) -> ReferralExchange.Timeslot[]

🔌 Usage

await client.offerings.listTimeslots("offeringId", {
    from: 1.1,
    isSubsidised: true,
});

⚙️ Parameters

offeringId: string

request: ReferralExchange.OfferingsListTimeslotsRequest

requestOptions: Offerings.RequestOptions

Public

client.public.getReferral(referralId, { ...params }) -> ReferralExchange.PublicReferralDto

🔌 Usage

await client.public.getReferral("referralId");

⚙️ Parameters

referralId: string — Referral ID

request: ReferralExchange.PublicGetReferralRequest

requestOptions: Public.RequestOptions

Webhooks

client.webhooks.submitSingHealthFormsg() -> void

🔌 Usage

await client.webhooks.submitSingHealthFormsg();

⚙️ Parameters

requestOptions: Webhooks.RequestOptions

client.webhooks.submitFormsg(formId) -> void

🔌 Usage

await client.webhooks.submitFormsg("formId");

⚙️ Parameters

formId: string

requestOptions: Webhooks.RequestOptions

Health

client.health.check() -> ReferralExchange.OkResponse

🔌 Usage

await client.health.check();

⚙️ Parameters

requestOptions: Health.RequestOptions