syntax = "proto3"; import "google/protobuf/struct.proto"; import "okapi-errors.proto"; option go_package = "src.whiteboxsystems.nl/decozo/okapi"; message Identifier { string type = 1; string value = 2; } message PatientRegistrationData { string id = 1; PatientMeta subject = 2; google.protobuf.Struct callbackProtocolData = 3; // Aangeven van extra data voor dienst specifieke zaken, bijv policy oid, google.protobuf.Struct serviceInput = 4; google.protobuf.Struct serviceOutput = 5; } message Name { string display = 1; repeated string given = 2; string ownName = 3; string ownNamePrefix = 4; string partnerName = 5; string partnerNamePrefix = 6; } message Address { string street = 1; string streetNumber = 2; string postalCode = 3; string city = 4; string country = 5; } message PatientMeta { Identifier identifier = 1; Name name = 2; Address address = 3; string birthdate = 4; // Date in format yyyy-mm-dd google.protobuf.Struct extra = 5; } message PatientRegistrationCreateOrUpdateData { string id = 1; PatientMeta subject = 2; google.protobuf.Struct callbackProtocolData = 3; google.protobuf.Struct serviceInput = 4; } message PatientRegistrationResult { string id = 1; google.protobuf.Struct serviceOuput = 2; OKAPIError error = 3; } // Probably do this streaming (also)? message CreateOrUpdatePatientRegistrationsRequest { string serviceId = 1; repeated PatientRegistrationCreateOrUpdateData registrations = 2; } message CreateOrUpdatePatientRegistrationsResponse { repeated PatientRegistrationResult results = 1; } message RemovePatientRegistrationsRequest { string serviceId = 1; repeated string registrations = 2; } message RemovePatientRegistrationsResponse { repeated PatientRegistrationResult results = 1; } message ListPatientRegistrationQuery { repeated string id = 1; repeated Identifier identifier = 2; } message ListPatientRegistrationsRequest { string serviceId = 1; ListPatientRegistrationQuery query = 2; } message ListPatientRegistrationsResponse { repeated PatientRegistrationData patientRegistrationData = 1; }