eMedit.Webhooks.Receiver
1.0.2
See the version list below for details.
dotnet add package eMedit.Webhooks.Receiver --version 1.0.2
NuGet\Install-Package eMedit.Webhooks.Receiver -Version 1.0.2
<PackageReference Include="eMedit.Webhooks.Receiver" Version="1.0.2" />
paket add eMedit.Webhooks.Receiver --version 1.0.2
#r "nuget: eMedit.Webhooks.Receiver, 1.0.2"
// Install eMedit.Webhooks.Receiver as a Cake Addin #addin nuget:?package=eMedit.Webhooks.Receiver&version=1.0.2 // Install eMedit.Webhooks.Receiver as a Cake Tool #tool nuget:?package=eMedit.Webhooks.Receiver&version=1.0.2
eMedit.Webhooks.Receiver
Potrebno je izvršiti implementaciju i naslijeđivanje klase eMeditWebhookHandler. Unutar nove klase mogu se override-ati metode koje predstavljaju događaje koji se dese na eMedit platformi.
public class MyCustomHandler : eMeditWebHookHandler
{
protected override void OnRspIns(eMeditWebhookNotification meditWebhookNotification, ReferralResponse referralResponse)
{
base.OnRspIns(meditWebhookNotification, referralResponse);
}
protected override void OnRspVer(eMeditWebhookNotification meditWebhookNotification, ReferralResponse referralResponse)
{
base.OnRspVer(meditWebhookNotification, referralResponse);
}
}
Metode se automatski aktiviraju i proslijeđuje se definisan set parametera koji odgovara trenutnom događaju.
Model eMeditWebhookNotification
sadrzi podatke releventne za sam događaj:
namespace eMedit.Webhooks.Utils.Models
{
public class eMeditWebhookNotification
{
public eMeditWebhookNotification();
public string Id { get; set; }
public int Attempt { get; set; }
public IDictionary<string, string> Properties { get; set; }
public string Username { get; set; }
public string DateTime { get; set; }
public string EventCode { get; set; }
public string JsonParameters { get; set; }
public string GetActionCode();
public string GetCabinetCode();
public string GetInstitutionCode();
}
}
Pored ovog koriste se jos i sljedeci modeli koji sadrze podatke koje se odnose na resurs nad kojim se desio događaj kao i dodatni set podataka samog resursa ukoliko je doslo do nekih promjena:
public class ReferralResponse
{
public ReferralResponse();
public string ReferralResponseID { get; set; }
public string ReferralID { get; set; }
}
public class Patient
{
public string PatientID { get; set; }
}
public class Referral
{
public string ReferralID { get; set; }
}
public class PrescriptionNotification
{
public string PrescriptionID { get; set; }
public PharmacyPatient Patient { get; set; }
public string AtcCode { get; set; }
public string MedicationCode { get; set; }
public string MedicationDescription { get; set; }
public string Dosage { get; set; }
public string Quantity { get; set; }
public bool IsRecommendedBySpecialist { get; set; }
public bool IsCommercial { get; set; }
public string PrescriptionType { get; set; }
public DateTime PrescriptionDate { get; set; }
public PharmacyDispense Dispense { get; set; }
public string CaseNumber { get; set; }
public string MedsolPrescriptionID { get; set; }
}
public class PharmacyPatient
{
public string Name { get; set; }
public string Surname { get; set; }
public string IdentificationCode { get; set; }
public string IdentificationType { get; set; }
public DateTime BirthDate { get; set; }
public string Gender { get; set; }
}
public class PharmacyDispense
{
public string PharmacyName { get; set; }
public string Pharmacist { get; set; }
public DateTime DispenseDate { get; set; }
public string DispenseQuantity { get; set; }
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- eMedit.Webhooks.Utils (>= 1.0.1)
- Microsoft.AspNet.WebHooks.Custom (>= 1.2.1)
- Microsoft.AspNet.WebHooks.Receivers.Custom (>= 1.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
eMedit Webhooks receiver.