models

package
v1.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Copyright 2021 Fundación UNID

Copyright 2021 Fundación UNID

Index

Constants

View Source
const (
	// From distinct API resources
	FhirApiAuthenticator         = "authenticator" // Who/what has authenticated the data
	FhirApiAuthor                = "author"        // Who/what has authored the data
	FhirApiOrganizationCustodian = "custodian"     // Organization which maintains the data
	FhirApiSubject               = "subject"       // Who/what is the subject data relates to
	FhirApiOrganization          = "organization"  // The organization custodian or responsible
	FhirApiManufacturer          = "manufacturer"  // Who manufacture
	FhirApiPerformer             = "performer"     // Who performs
	FhirApiAsserter              = "asserter"      // Source of the information
	FHirApiRecorder              = "recorder"      // Who recorder
	FhirApiDevice                = "device"        // Device identifier

	// DocumentReference
	FhirApiCategory        = "category"    // IPS / USCDI section (High-level kind of clinical document) e.g. "11369-6" (History of Immunization)
	FhirApiMimeContentType = "contenttype" // e.g. application/pdf
	FhirApiDate            = "date"        // When the FHIR resource was created in ISO format (FHIR dateTime)
	FhirApiDescription     = "description" // Human-readable description
	FhirApiEncounter       = "encounter"   // Context of the document content
	FhirApiEvent           = "event"       // Main clinical acts documented
	FhirApiFacilityType    = "facility"    // Kind of facility where subject was seen
	FhirApiFormatCodeSet   = "format"      // Format/content rules for the document e.g. "urn:ihe:pcc:xphr:2007" or "urn:ihe:pcc:ic:2008"
	FhirApiIdentifier      = "identifier"  // Master Version Specific Identifier
	FhirApiLanguage        = "language"    // Language of the FHIR resource
	FhirApiLocation        = "location"    // URI where the data can be found
	FhirApiPeriod          = "period"      // FHIR dateTime: time of service that is being documented
	FhirApiRelated         = "related"
	FhirApiRelatesTo       = "relatesto"
	FhirApiRelation        = "relation"
	FhirApiRelationShip    = "relationship"
	FhirApiSecurityLabel   = "security-label"
	FhirApiPracticeSetting = "setting" // Clinical Specialty: additional details about where the content was created (e.g. clinical specialty)
	FhirApiStatus          = "status"  // Current status (accepted values depends on each specific FHIR resource)

	// Procedure
	FhirApiBasedOn               = "based-on"
	FhirApiCode                  = "code"
	FhirApiInstantiatesCanonical = "instantiates-canonical"
	FhirApiInstantiatesUri       = "instantiates-uri"
	FhirApiPartOf                = "part-of"
	FhirApiReasonCode            = "reason-code" // Why occurred the healthcare process
	FhirApiReasonReference       = "reason-reference"

	// Device
	FhirApiModel               = "model"
	FhirApiType                = "type"        // Type for device, also for additional more precise type of document ...
	FhirApiDeviceUdiCarrierHRF = "udi-carrier" // UDI Barcode (RFID or other technology) string in *HRF* format
	FhirApiDeviceUdiDI         = "udi-di"      // The udi Device Identifier (DI)
	FhirApiURL                 = "url"         // Network address to contact device

	// Immunization
	FhirApiLotNumber    = "lot-number"     // Vaccine lot number.
	FhirApiReaction     = "reaction"       // Observation with details on reaction
	FhirApiReactionDate = "reaction-date"  // Both for immunization and for allergies and intolerances
	FhirStatusReason    = "status-reason"  // Not done reason code
	FhirTargetDisease   = "target-disease" // Target disease.

	// Allergies and intolerances
	FhirApiClinicalStatus        = "clinical-status"
	FhirApiCritically            = "critically"
	FhirApiOccurrenceLastDate    = "last-date"
	FhirApiReactionManifestation = "manifestation"
	FhirApiReactionOnset         = "onset"
	FhirApiRoute                 = "route" // Path of substance
	FhirApiSeverity              = "severity"
	FhirApiVerificationStatus    = "verification-status"

	// MedicationAdministration
	FhirApiContext        = "context" // reference to episode of care or encounter
	FhirApiEffectiveTime  = "effective-time"
	FhirApiMedication     = "medication"
	FhirApiReasonGiven    = "reason-given"
	FhirApiReasonNotGiven = "reason-not-given"
	FhirApiRequest        = "request"
)
View Source
const (
	UhcApiConnection           = "connection"        // ID of an existing UHC connection
	UhcApiTextTile             = "text-title"        // Title in plain text filed by a practitioner or device (no xhtml)
	UhcApiDocStatus            = "docstatus"         // e.g. "final", "preliminary", "amended", "entered-in-error"
	UhcApiSHA1Hex              = "sha1-hex"          // Legacy SHA1 digest in hexadecimal (FHIR Attachment Hash is Base64 SHA1,not Hex)
	UhcApiBytesSize            = "size"              // Number of bytes of content
	UhcApiCreationDateTime     = "creation"          // When the attached file or message was created (distinct from FhirApiDate for FHIR resources)
	UhcApiVaccineCodeCVX       = "vaccine-cvx"       // Vaccine Administered  CVX code.
	UhcApiDoseNumber           = "dose-number"       // Dose number within series.
	UhcApiDosesRecommended     = "doses-recommended" // Recommended number of doses for immunity.
	UhcApiExpirationDate       = "expiration"        // FHIR dateTime of expiration
	UhcApiDoseQuantity         = "dose-quantity"     // Amount of dose and international unit separated by "|" e.g.: 1|mL
	UhcApiSiteBody             = "site"              // Body site
	UhcApiAdministrationMethod = "method"            // How drug was administered
	UhcApiRateRatioNumerator   = "ratio-numerator"   // Numerator value with international unit separated by "|" e.g.: 1|mL
	UhcApiRateRatioDenominator = "ratio-denominator" // Denominator value with international unit separated by "|" e.g.: 1|mL
	UhcApiRateQuantity         = "rate-quantity"     // Dose quantity per unit of time with international unit separated by "|" e.g.: 1|mL
)
View Source
const (
	// for 'Usage'
	EncryptionKeyTypeEncryption = "ENCRYPTION" // Please avoid this name and use KeyUsageEncryption
	EncryptionKeyTypeSigning    = "SIGN"       // Please avoid this name and use KeyUsageSigning
	KeyUsageEncryption          = "ENCRYPTION" // Use this one instead of EncryptionKeyTypeEncryption
	KeyUsageSigning             = "SIGN"       // Use this one instead of EncryptionKeyTypeSigning
	// for 'Type'
	X25519KeyType  = "X25519KeyAgreementKey2019"
	Ed25519KeyType = "Ed25519VerificationKey2018"
)
View Source
const (
	OrganizationUHCAccessNONE  = "NONE"
	OrganizationUHCAccessADMIN = "ADMIN"
)
View Source
const (
	OrganizationUHCStatusINACTIVE = "INACTIVE"
	OrganizationUHCStatusADMIN    = "ACTIVE"
)
View Source
const (
	WalletKeyOwnerTypeDevice = "DEVICE"
	WalletKeyOwnerTypeUSER   = "USER"
)
View Source
const DidDocSchema = `` /* 3053-byte string literal not displayed */
View Source
const HL7CodeSystemLOINC = "http://loinc.org"
View Source
const HL7CodeSystemSNOMED = "http://snomed.info/sct"
View Source
const HeaderFHIR = "x-fhir-"
View Source
const HeaderUHC = "x-uhc-"
View Source
const ReadStatus = "READ"
View Source
const SecurityV1DocSchema = `` /* 2059-byte string literal not displayed */
View Source
const SecurityV2DocSchema = `` /* 3230-byte string literal not displayed */
View Source
const TrustblocContext = `` /* 1600-byte string literal not displayed */
View Source
const UhcCodeTagCovidData = "COVID_DATA"
View Source
const UnreadStatus = "UNREAD"

Variables

View Source
var JsonldCache = map[string]interface{}{
	"https://w3id.org/security/v1":                                 SecurityV1DocSchema,
	"https://w3id.org/security/v2":                                 SecurityV2DocSchema,
	"https://trustbloc.github.io/context/vc/credentials-v1.jsonld": TrustblocContext,
}

Functions

func GeApiFhirParamTokenByCodeLOINC added in v1.0.60

func GeApiFhirParamTokenByCodeLOINC(paramToken *string) *string

func GeApiFhirParamTokenByCodeSNOMED added in v1.0.60

func GeApiFhirParamTokenByCodeSNOMED(paramToken *string) *string

func GetCodeByApiFhirParamToken added in v1.0.60

func GetCodeByApiFhirParamToken(paramToken, system *string) *string

Method returns the code after splitting paramCode by "|" (system|code): https://www.hl7.org/fhir/search.html#token

func GetDigestValue

func GetDigestValue(algorithm string, data []byte) (digestValue string, err error)

GetDigestValue returns the digest of some data, using a specified algorithm. It only returns an error when an invalid algorithm is used. The valid ones are: SHA1, SHA256, SHA512, SHA3256, and SHA3512.

func GetHashKeccakShake256AsHexString

func GetHashKeccakShake256AsHexString(bytes []byte) string

func GetHashKeccakShake256Bytes

func GetHashKeccakShake256Bytes(bytes []byte) []byte

func GetHashLegacySHA1AsHexString

func GetHashLegacySHA1AsHexString(bytes []byte) string

func GetHashSHA3256AsHexString

func GetHashSHA3256AsHexString(bytes []byte) string

func GetPeriodStartOrEndByApiFhirParamDate added in v1.0.60

func GetPeriodStartOrEndByApiFhirParamDate(paramDate *string, endPeriod bool) *string

returns a date 'start' (false) or 'end' (true) from a Period date parameter removing boundaries

func RemoveFhirBoundariesFromDateString added in v1.0.60

func RemoveFhirBoundariesFromDateString(date *string) *string

Types

type AcceptedTermsAndCondition

type AcceptedTermsAndCondition struct {
	TermsAndConditionsId string    `json:"termsAndConditionsId,omitempty" bson:"termsAndConditionsId,omitempty"`
	AcceptedDate         time.Time `json:"acceptedDate,omitempty" bson:"acceptedDate,omitempty"`
}

type ApiDocumentReferenceClaimsJWT

type ApiDocumentReferenceClaimsJWT struct {
	// gojwt.Claims
	jwt.StandardClaims
	ApiDocumentReferenceOptions
}

type ApiDocumentReferenceOptions

type ApiDocumentReferenceOptions struct {
	// UHC specific
	ConnectionUHC string // UHC private connection e.g. http://api.unid.es/v1/connection/987
	DocStatus     string // e.g. "final", "preliminary", "amended", "entered-in-error"
	TextTitle     string // Title in plain text filed by a practitioner or device (no xhtml)
	FileSHA1Hex   string // Legacy SHA1 digest in hexadecimal (FHIR Attachment Hash is Base64 SHA1,not Hex)
	FileSize      string // Number of bytes of content
	FileDate      string // Number of bytes of content
	// DocumentReference
	Authenticator         string // Who signs the data e.g. http://unid.es/api/v1/fhir/R4/Person/123
	Author                string // Who created the data e.g. http://unid.es/api/v1/fhir/R4/Practitioner/234
	CategoryLOINC         string // IPS / USCDI section (High-level kind of clinical document) e.g. "http://loinc.org|11369-6" (History of Immunization)
	ContentMimeType       string // e.g. "application/pdf"
	CustodianOrganization string // Organization which maintains the document e.g. http://unid.es/api/v1/fhir/R4/Organization/345
	DateTime              string // When was created (FHIR dateTime stored as FHIR ISO format)
	FacilityTypeSNOMED    string // Kind of facility where subject was seen
	FormatCodeSet         string // e.g. "urn:ihe:pcc:xphr:2007" or "urn:ihe:pcc:ic:2008"
	Identifier            string // Master Version Specific Identifier
	Language              string // Human language of attached file content (BCP-47)
	Location              string // URI where the data can be found
	Period                string // Time service that is being documented e.g. "date=eq2010-01-01&date=eq2011-12-31"
	PracticeSettingSNOMED string // Clinical Specialty: details about where the content was created
	SecurityLabelHL7      string // Document security-tag e.g. "http://terminology.hl7.org/CodeSystem/v3-ActReason|HLEGAL"
	StatusHL7             string // Current status (accepted values depends on each specific FHIR resource)
	Subject               string // Who/what is the subject of the document
	TypeLOINC             string // Additional more precise type of clinical document filed by practitioner or device
}

func (*ApiDocumentReferenceOptions) GetBaseDocumentReferenceByHttpRequest added in v1.0.60

func (apiImmunization *ApiDocumentReferenceOptions) GetBaseDocumentReferenceByHttpRequest(r *http.Request) BaseDocumentReference

Method GetBaseDocumentReferenceByRequestForm returns a BaseDocumentReference created with the ApiOptions received by an API

func (*ApiDocumentReferenceOptions) GetDocumentReferenceApiTags added in v1.0.60

func (apiImmunization *ApiDocumentReferenceOptions) GetDocumentReferenceApiTags() ApiDocumentReferenceOptions

Method GetDocumentReferenceApiTags returns the valid headers to be used for a FHIR DocumentReference API

type ApplicationLicense

type ApplicationLicense struct {
	AppName  string    `bson:"id,omitempty" json:"id,omitempty"`
	AppKey   string    `bson:"key,omitempty" json:"key,omitempty"`
	Licenses []License `bson:"licenses,omitempty" json:"licenses,omitempty"`
}

type ApplicationPermission

type ApplicationPermission struct {
	ServiceName string     `bson:"serviceName,omitempty" json:"serviceName,omitempty"`
	ServiceRole string     `bson:"serviceRole,omitempty" json:"serviceRole,omitempty"`
	CreatedAt   *time.Time `bson:"createdAt,omitempty" json:"createdAt,omitempty"`
	UpdatedAt   *time.Time `bson:"updatedAt,omitempty" json:"updatedAt,omitempty"`
}

type BaseDocumentReference

type BaseDocumentReference struct {
	TextTitle             *string                        // Text title of the resource (FHIR text is xhtml) filed by a practitioner or device
	Language              *string                        // Language of the document
	Status                *fhir4.DocumentReferenceStatus // Fix to "current" when creating (other are: superseded, entered-in-error)
	DocStatus             *fhir4.CompositionStatus       // Fixed to "final" (other are: preliminary, amended, entered-in-error)
	CategoryLOINC         *string                        // The health history section goes to array[0], e.g. "11369-6" (History of Immunization)
	Date                  *string                        // When the document was created
	FileDataB64           *string                        // The data encoded in Base64 format
	FileMimeContentType   *string                        // e.g. application/pdf
	FileHexSHA1           *string                        // Legacy SHA1 digest in hexadecimal (FHIR Attachment is BASE64 SHA1)
	FileSize              *int                           // Number of bytes of content
	TypeLOINC             *string                        // Kind of document or Health Section, e.g.: "48765-2" (Allergies and adverse reactions Document)
	ContextPeriodStart    *string                        // FHIR dateTime: time of service that is being documented
	ContextPeriodEnd      *string                        // FHIR dateTime: end of time service that is being documented
	ContentFormatCodeSet  *string                        // e.g. "urn:ihe:pcc:xphr:2007" or "urn:ihe:pcc:ic:2008"
	FacilitySNOMED        *string                        // Kind of facility where patient was seen
	PracticeSettingSNOMED *string                        // Clinical Specialty: details about where the content was created
	// SecurityLabelsFHIR   *[]string // Document security-tags
	Description            *string // Description generated by Practitioner / Device
	SubjectUHC             *string // Who/what is the subject of the document
	AuthorReference        *string // Who and/or what authored the document
	AuthenticatorReference *string // Who/what authenticated the document
	CustodianReference     *string // Organization which maintains the document
}

func (*BaseDocumentReference) CreateDocumentReferenceFHIR

func (docRefParams *BaseDocumentReference) CreateDocumentReferenceFHIR(fileBytes *[]byte) (fhir4.DocumentReference, error)

Method CreateDocumentReferenceFHIR creates a FHIR DocumentReference using the initialized BaseDocumentReference and given fileBytes

func (*BaseDocumentReference) GetParams

func (docRefParams *BaseDocumentReference) GetParams() *BaseDocumentReference

type BiographyUHC added in v1.0.77

type BiographyUHC struct {
	ID               string                     `json:"id,omitempty" bson:"id,omitempty"` // It should be the same as...
	UhcUserId        string                     `json:"uhcUserId,omitempty" bson:"uhcUserId,omitempty"`
	ResourceLanguage string                     `json:"resourceLanguage,omitempty" bson:"resourceLanguage,omitempty"`
	Title            string                     `json:"title,omitempty" bson:"title,omitempty"`
	Description      string                     `json:"description,omitempty" bson:"description,omitempty"`
	Section          string                     `json:"section,omitempty" bson:"section,omitempty"`
	UhcCodeTags      []string                   `json:"uhcCodeTags,omitempty" bson:"uhcCodeTags,omitempty"`
	LastUpdated      string                     `json:"lastUpdated,omitempty" bson:"lastUpdated,omitempty"`
	SectionUSCDI     string                     `json:"sectionUSCDI,omitempty" bson:"sectionUSCDI,omitempty"`
	SectionIPS       string                     `json:"sectionIPS,omitempty" bson:"sectionIPS,omitempty"`
	Presentation     PresentationWithBundleInVC `json:"presentation,omitempty" bson:"presentation,omitempty"`
}

type ChangePasswordRequest

type ChangePasswordRequest struct {
	Email       string `bson:"email,omitempty" json:"email,omitempty"`
	Code        string `bson:"code,omitempty" json:"code,omitempty"`
	NewPassword string `bson:"newPassword,omitempty" json:"newPassword,omitempty"`
}

type ConfirmUserData

type ConfirmUserData struct {
	Email string `bson:"email,omitempty" json:"email,omitempty"`
	Code  string `bson:"code,omitempty" json:"code,omitempty"`
}

type ConnectionCreationImplicitRequest

type ConnectionCreationImplicitRequest struct {
	Type                             string `json:"type" bson:"type"`
	Label                            string `json:"label,omitempty" bson:"label,omitempty"`
	Goal                             string `json:"goal,omitempty" bson:"goal,omitempty"`
	GoalCode                         string `json:"goal-code,omitempty" bson:"goal-code,omitempty"`
	ImplicitInitiatorUserId          string `json:"implicitInitiatorUserId" bson:"implicitInitiatorUserId"`
	ImplicitInvitationTokenInitiator string `json:"implicitInvitationTokenInitiator" bson:"implicitInvitationTokenInitiator"`
}

type ConnectionExternalCreationRequest

type ConnectionExternalCreationRequest struct {
	Type                        string                     `json:"type" bson:"type"`
	Label                       string                     `json:"label,omitempty" bson:"label,omitempty"`
	Goal                        string                     `json:"goal,omitempty" bson:"goal,omitempty"`
	GoalCode                    string                     `json:"goal-code,omitempty" bson:"goal-code,omitempty"`
	ExternalInvitationDetails   *ExternalInvitationDetails `json:"externalInvitationDetails,omitempty" bson:"externalInvitationDetails,omitempty"`
	InvitedUserId               string                     `json:"invitedUserId" bson:"invitedUserId"`
	InvitedUserEmail            string                     `json:"invitedUserEmail" bson:"invitedUserEmail"`
	EncryptionKeyOrganizationId string                     `json:"encryptionKeyOrganizationId" bson:"encryptionKeyOrganizationId"`
}

type ConnectionUHC

type ConnectionUHC struct {
	ID                        string                     `json:"id" bson:"id"`
	InvitationUhcId           string                     `json:"invitationUhcId,omitempty" bson:"invitationUhcID,omitempty"`
	InitiatorUserId           string                     `json:"initiatorUserId,omitempty" bson:"initiatorUserId,omitempty"`
	InvitedUserId             string                     `json:"invitedUserId,omitempty" bson:"invitedUserId,omitempty"`
	EncryptionRequirements    EncryptionRequirements     `json:"encryptionRequirements" bson:"encryptionRequirements"`
	ActivePermissions         *[]PermissionsUHC          `json:"activePermissions" bson:"activePermissions"`
	PendingPermissionsRequest *[]PermissionsRequestUHC   `json:"requestedPendingPermissions" bson:"requestedPendingPermissions"`
	CreatedAt                 *time.Time                 `json:"createdAt" bson:"createdAt"`
	UpdatedAt                 *time.Time                 `json:"updatedAt" bson:"updatedAt"`
	Status                    string                     `json:"status" bson:"status"`
	ExternalInvitationDetails *ExternalInvitationDetails `json:"externalInvitationDetails,omitempty" bson:"externalInvitationDetails,omitempty"`
	ReadStatus                string                     `json:"readStatus,omitempty" bson:"readStatus,omitempty"`
}

type ConnectionUHCResponse

type ConnectionUHCResponse struct {
	Code    int             `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64           `bson:"count,omitempty" json:"count,omitempty"`
	Message string          `bson:"message,omitempty" json:"message,omitempty"`
	Data    []ConnectionUHC `bson:"data,omitempty" json:"data,omitempty"`
	Token   Token           `bson:"token,omitempty" json:"token,omitempty"`
}

type ConnectionsWithInvitationsUHC added in v1.0.92

type ConnectionsWithInvitationsUHC struct {
	Connections []ConnectionUHC `bson:"connections,omitempty" json:"connections,omitempty"`
	Invitations []InvitationUHC `bson:"invitations,omitempty" json:"invitations,omitempty"`
}

type ConnectionsWithInvitationsUHCResponse added in v1.0.92

type ConnectionsWithInvitationsUHCResponse struct {
	Code    int                             `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64                           `bson:"count,omitempty" json:"count,omitempty"`
	Message string                          `bson:"message,omitempty" json:"message,omitempty"`
	Data    []ConnectionsWithInvitationsUHC `bson:"data,omitempty" json:"data,omitempty"`
}

type CredentialFHIR added in v1.0.77

type CredentialFHIR struct {
	Context               []string                 `json:"@context,omitempty" bson:"@context,omitempty"`
	ID                    string                   `json:"id,omitempty" bson:"id,omitempty"`
	Types                 []string                 `json:"type,omitempty" bson:"type,omitempty"`
	Issuer                verifiable.Issuer        `json:"issuer,omitempty" bson:"issuer,omitempty"`
	Issued                string                   `json:"issuanceDate,omitempty" bson:"issuanceDate,omitempty"`
	Expired               string                   `json:"expirationDate,omitempty" bson:"expirationDate,omitempty"`
	Proofs                []proof.Proof            `json:"proof,omitempty" bson:"proof,omitempty"`
	Status                *verifiable.TypedID      `json:"credentialStatus,omitempty" bson:"credentialStatus,omitempty"`
	Schemas               []verifiable.TypedID     `json:"credentialSchema,omitempty" bson:"credentialSchema,omitempty"`
	Evidence              verifiable.Evidence      `json:"evidence,omitempty" bson:"evidence,omitempty"`
	TermsOfUse            []verifiable.TypedID     `json:"termsOfUse,omitempty" bson:"termsOfUse,omitempty"`
	RefreshService        []verifiable.TypedID     `json:"refreshService,omitempty" bson:"refreshService,omitempty"`
	CustomFields          CustomFields             `json:"-" bson:"customFields,omitempty"` // All unmapped fields are put here.
	CredentialSubjectFHIR CredentialVerifiableFHIR `json:"credentialSubject,omitempty" bson:"credentialSubject,omitempty"`
}

type CredentialVerifiableFHIR added in v1.0.77

type CredentialVerifiableFHIR struct {
	BundleFHIR fhir4.Bundle `json:"fhir,omitempty" bson:"fhir,omitempty"` // The bundle document
}

type CustomFields added in v1.0.77

type CustomFields map[string]interface{} // CustomFields is a map of extra fields of struct build when unmarshalling JSON which are not mapped to the struct fields.

type DecryptedResult

type DecryptedResult struct {
	DecryptedMessage string `bson:"decryptedMessage,omitempty" json:"decryptedMessage,omitempty"`
}

type DecryptedResultResponse

type DecryptedResultResponse struct {
	Code    int               `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64             `bson:"count,omitempty" json:"count,omitempty"`
	Message string            `bson:"message,omitempty" json:"message,omitempty"`
	Data    []DecryptedResult `bson:"data,omitempty" json:"data,omitempty"`
}

type DecryptionRequest

type DecryptionRequest struct {
	Payload                  string `bson:"payload,omitempty" json:"payload,omitempty"`
	EncryptionKeyId          string `bson:"encryptionKeyId,omitempty" json:"encryptionKeyId,omitempty"`
	AccessPassword           string `bson:"accessPassword,omitempty" json:"accessPassword,omitempty"`
	OtherPartPublicKeyBase64 string `bson:"otherPartPublicKeyBase64,omitempty" json:"otherPartPublicKeyBase64,omitempty"`
}

type DefaultResponse

type DefaultResponse struct {
	Code    int
	Message string
	Data    interface{}
	Count   int64
}

type DefaultResponseWithDataByte

type DefaultResponseWithDataByte struct {
	Code    int
	Message string
	Data    []byte
}

func (*DefaultResponseWithDataByte) ReturnCustomResponse

func (rawJson *DefaultResponseWithDataByte) ReturnCustomResponse(w http.ResponseWriter, code int, customCode int, customMessage string, jsonData *json.RawMessage)

type Device

type Device struct {
	ID                  string `bson:"accessPassword,omitempty" json:"accessPassword,omitempty"`
	OwnerOrganizationId string `bson:"ownerOrganizationId,omitempty" json:"ownerOrganizationId,omitempty"`
	Type                string `bson:"type,omitempty" json:"type,omitempty"`
}

type DigestSigned

type DigestSigned struct {
	DigestToSign DigestToSign  `bson:",inline"`
	Proof        []proof.Proof `bson:"proof,omitempty" json:"proof,omitempty"` // the signature proof
}

type DigestToSign

type DigestToSign struct {
	Type            string   `bson:"type,omitempty" json:"type,omitempty"`                       // "@type": "Digest"
	Context         []string `bson:"context,omitempty" json:"@context,omitempty"`                // "@context": ["https://w3id.org/security/v1"]
	DigestValue     string   `bson:"digestValue,omitempty" json:"digestValue,omitempty"`         // hexadecimal SHA3-256 digest value (base-16 format) or UUID random v4 strings
	DigestAlgorithm string   `bson:"digestAlgorithm,omitempty" json:"digestAlgorithm,omitempty"` // if challenge is a digest: "sha3-256"
	Capability      string   `bson:"capability,omitempty" json:"capability,omitempty"`           // to use the cryptographic keys associated with the required capability
	ProofPurpose    string   `bson:"proofPurpose,omitempty" json:"proofPurpose,omitempty"`       // the purpose of the signature: "digest", "authentication", "assertionMethod" ...
}

type Document added in v1.0.91

type Document struct {
	ID               string    `json:"id,omitempty" bson:"id,omitempty"`
	ProfileType      string    `json:"profileType,omitempty" bson:"profileType,omitempty"`
	Title            string    `json:"title,omitempty" bson:"title,omitempty"`
	Description      string    `json:"description,omitempty" bson:"description,omitempty"`
	OriginalFilename string    `json:"originalFilename,omitempty" bson:"originalFilename,omitempty"`
	FileType         string    `json:"fileType,omitempty" bson:"filetType,omitempty"`
	S3Filename       string    `json:"s3Filename,omitempty" bson:"s3Filename,omitempty"`
	TemporaryUrl     string    `json:"temporaryUrl,omitempty" bson:"temporaryUrl,omitempty"`
	Date             time.Time `json:"date,omitempty" bson:"date,omitempty"`
	LastUpdated      time.Time `json:"lastUpdated,omitempty" bson:"lastUpdated,omitempty"`
}

type DocumentResponse added in v1.0.91

type DocumentResponse struct {
	Code    int        `json:"code,omitempty" bson:"code,omitempty"`
	Message string     `json:"message,omitempty" bson:"message,omitempty"`
	Data    []Document `json:"data,omitempty" bson:"data,omitempty"`
	Count   int64      `json:"count,omitempty" bson:"count,omitempty"`
}

type EncryptedEhr added in v1.0.78

type EncryptedEhr struct {
	ID                     string     `bson:"id,omitempty" json:"id,omitempty"`
	Type                   string     `bson:"type,omitempty" json:"type,omitempty"`
	UhcUserId              string     `json:"uhcUserId,omitempty" bson:"uhcUserId,omitempty"`
	EncryptionKeyId        string     `json:"encryptionKeyId,omitempty" bson:"encryptionKeyId,omitempty"`
	EncryptedPayloadBase64 string     `bson:"encryptedPayloadBase64,omitempty" json:"encryptedPayloadBase64,omitempty"`
	Codes                  []string   `bson:"codes,omitempty" json:"codes,omitempty"`
	UhcCodeTags            []string   `bson:"uhcCodeTags,omitempty" json:"uhcCodeTags,omitempty"`
	CreatedAt              *time.Time `bson:"createdAt,omitempty" json:"createdAt,omitempty"`
	UpdatedAt              *time.Time `bson:"updatedAt,omitempty" json:"updatedAt,omitempty"`
}

type EncryptedEhrCreationRequest added in v1.0.81

type EncryptedEhrCreationRequest struct {
	BiographyUHC   BiographyUHC `bson:"biographyUHC,omitempty" json:"biographyUHC,omitempty"`
	AccessPassword string       `bson:"accessPassword,omitempty" json:"accessPassword,omitempty"`
}

type EncryptedEhrDecryptionRequest added in v1.0.83

type EncryptedEhrDecryptionRequest struct {
	EncryptedEhrId *string   `bson:"encryptedEhrId,omitempty" json:"encryptedEhrId,omitempty"`
	UhcCodeTags    *[]string `bson:"uhcCodeTags,omitempty" json:"uhcCodeTags,omitempty"`
	AccessPassword string    `bson:"accessPassword,omitempty" json:"accessPassword,omitempty"`
	Limit          *int      `bson:"limit,omitempty" json:"limit,omitempty"`
	Skip           *int      `bson:"skip,omitempty" json:"skip,omitempty"`
}

type EncryptedEhrDecryptionResponse added in v1.0.83

type EncryptedEhrDecryptionResponse struct {
	Code    int            `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64          `bson:"count,omitempty" json:"count,omitempty"`
	Message string         `bson:"message,omitempty" json:"message,omitempty"`
	Data    []BiographyUHC `bson:"data,omitempty" json:"data,omitempty"`
}

type EncryptedEhrResponse added in v1.0.78

type EncryptedEhrResponse struct {
	Code    int            `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64          `bson:"count,omitempty" json:"count,omitempty"`
	Message string         `bson:"message,omitempty" json:"message,omitempty"`
	Data    []EncryptedEhr `bson:"data,omitempty" json:"data,omitempty"`
}

type EncryptedResult

type EncryptedResult struct {
	EncryptedMessageBase64 string `bson:"encryptedMessageBase64,omitempty" json:"encryptedMessageBase64,omitempty"`
}

type EncryptedResultResponse

type EncryptedResultResponse struct {
	Code    int               `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64             `bson:"count,omitempty" json:"count,omitempty"`
	Message string            `bson:"message,omitempty" json:"message,omitempty"`
	Data    []EncryptedResult `bson:"data,omitempty" json:"data,omitempty"`
}

type EncryptionRequest

type EncryptionRequest struct {
	Payload                  string `bson:"payload,omitempty" json:"payload,omitempty"`
	EncryptionKeyId          string `bson:"encryptionKeyId,omitempty" json:"encryptionKeyId,omitempty"`
	AccessPassword           string `bson:"accessPassword,omitempty" json:"accessPassword,omitempty"`
	OtherPartPublicKeyBase64 string `bson:"otherPartPublicKeyBase64,omitempty" json:"otherPartPublicKeyBase64,omitempty"`
}

type EncryptionRequirements

type EncryptionRequirements struct {
	InitiatorPublicKey       string  `bson:"initiatorPublicKey,omitempty" json:"initiatorPublicKey,omitempty"`
	InvitedPublicKey         string  `bson:"invitedPublicKey,omitempty" json:"invitedPublicKey,omitempty"`
	InitiatorEncryptionKeyId *string `json:"initiatorEncryptionKeyId" bson:"initiatorEncryptionKeyId"`
	InvitedEncryptionKeyId   *string `json:"invitedEncryptionKeyId" bson:"invitedEncryptionKeyId"`
}

type ExternalBase64MessageCreationRequest

type ExternalBase64MessageCreationRequest struct {
	ExternalMessageDirectives ExternalMessageDirectives `json:"externalDirectives" bson:"externalDirectives"`
	Base64Message             string                    `json:"base64Message,omitempty" bson:"base64Message,omitempty"`
	Type                      string                    `json:"type,omitempty" bson:"type,omitempty"`
	FileType                  *string                   `json:"FileType,omitempty" bson:"FileType,omitempty"`
}

type ExternalFhirMessageCreationRequest

type ExternalFhirMessageCreationRequest struct {
	ExternalMessageDirectives ExternalMessageDirectives `json:"externalDirectives" bson:"externalDirectives"`
	FhirMessage               fhir4.Bundle              `json:"fhirMessage,omitempty" bson:"fhirMessage,omitempty"`
}

type ExternalInvitationDetails added in v1.0.65

type ExternalInvitationDetails struct {
	ExternalSenderUserDetails *ExternalSenderUserDetails `json:"externalSenderUserDetails,omitempty" bson:"externalSenderUserDetails,omitempty"`
	OrganizationId            string                     `json:"organizationId,omitempty" bson:"organizationId,omitempty"`
}

type ExternalMessageCreationResult

type ExternalMessageCreationResult struct {
	SentMessageUhc       *MessageUHC                `json:"sentMessage,omitempty" bson:"sentMessage,omitempty"`
	CreatedConnectionUhc *ConnectionUHC             `json:"createdConnectionUHC,omitempty" bson:"createdConnectionUHC,omitempty"`
	CreatedUserUhc       *ExternalMessageDirectives `json:"createdUserUhc,omitempty" bson:"createdUserUhc,omitempty"`
}

type ExternalMessageCreationResultResponse

type ExternalMessageCreationResultResponse struct {
	Code    int                             `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64                           `bson:"count,omitempty" json:"count,omitempty"`
	Message string                          `bson:"message,omitempty" json:"message,omitempty"`
	Data    []ExternalMessageCreationResult `bson:"data,omitempty" json:"data,omitempty"`
}

type ExternalMessageDirectives

type ExternalMessageDirectives struct {
	ToEmail                   string                     `json:"toEmail,omitempty" bson:"toEmail,omitempty"`
	ToUserId                  *string                    `json:"toUserId,omitempty" bson:"toUserId,omitempty"`
	ExternalSenderUserDetails *ExternalSenderUserDetails `json:"externalSenderUserDetails,omitempty" bson:"externalSenderUserDetails,omitempty"`
}

type ExternalSenderUserDetails added in v1.0.65

type ExternalSenderUserDetails struct {
	FromEmail           string  `json:"fromEmail,omitempty" bson:"fromEmail,omitempty"`
	FirstName           string  `json:"firstName,omitempty" bson:"firstName,omitempty"`
	LastName            string  `json:"lastName,omitempty" bson:"lastName,omitempty"`
	TitleInOrganization *string `json:"titleInOrganization,omitempty" bson:"titleInOrganization,omitempty"`
}

type FhirCredentialSubject

type FhirCredentialSubject struct {
	FhirOrganization    *fhir4.Organization              `bson:"fhir,omitempty" json:"fhir,omitempty"`
	UhcPublicExtensions *OrganizationPublicUHCExtensions `bson:"uhcPublicExtensions,omitempty" json:"uhcPublicExtensions,omitempty"` //dlt: no
}

type HashDltOutput

type HashDltOutput struct {
	Id              string `bson:"id,omitempty" json:id",omitempty"`                           // UUID random v4 identifying document's digest value
	DigestValue     string `bson:"digestValue,omitempty" json:digestValue",omitempty"`         // hexadecimal digest value in base-16 format
	DigestAlgorithm string `bson:"digestAlgorithm,omitempty" json:digestAlgorithm",omitempty"` // "sha3-256" or other hash function used when generating document's digest value
	TxTimestampISO  string `bson:"txTimestamp,omitempty" json:txTimestamp",omitempty"`         // the timestamp of the blockchain transaction
	TxId            string `bson:"txId,omitempty" json:txId",omitempty"`                       // the identifier of the blockchain transaction
}

type I18nText

type I18nText struct {
	Language string `bson:"language,omitempty" json:"language,omitempty"`
	Text     string `bson:"text,omitempty" json:"text,omitempty"`
}

type ImmunizationApiParams added in v1.0.77

type ImmunizationApiParams struct {
	// UHC specific
	ConnectionUHC       string // UHC private connection e.g. http://api.unid.es/v1/connection/987
	RecipientMessageUHC string

	// Immunization Terminology Bindings
	VaccineCode       string // system|code
	ImmunizationSite  string
	ImmunizationRoute string

	// Immunization Search Params
	OccurrenceDate  string // Vaccination (non)-Administration Date
	Identifier      string // Cross border identifier (not internal ID)
	Location        string // The service delivery location or facility in which the vaccine was / was to be administered
	LotNumber       string // Vaccine lot number.
	Manufacturer    string // Vaccine Manufacturer Organization Reference URI
	Patient         string // Who/what is the patient for the resource
	Performer       string // The practitioner or organization who played a role in the vaccination
	Reaction        string // Observation with details on reaction
	ReactionDate    string // Both for immunization and for allergies and intolerances
	ReasonCode      string // Reason why the vaccine was administered
	ReasonReference string // Resource about why immunization occurred
	Series          string // The series being followed by the provider
	StatusHL7       string // Immunization event status
	StatusReason    string // Not done reason code
	TargetDiseases  string // Target diseases.

	// Added Params
	SerieDosesRecommended string // Recommended number of doses for immunity.
	SerieDoseNumber       string // Dose number within series e.g.: 1
	ValueQuantity         string // Amount administered as quantity|unitcode e.g.: 1|mL
}

func (*ImmunizationApiParams) GetImmunizationApiTags added in v1.0.77

func (apiImmunization *ImmunizationApiParams) GetImmunizationApiTags() ImmunizationApiParams

Method GetImmunizationApiTags returns the valid params to be used

func (*ImmunizationApiParams) GetImmunizationFormByHttpRequest added in v1.0.77

func (apiImmunization *ImmunizationApiParams) GetImmunizationFormByHttpRequest(r *http.Request)

Method GetImmunizationFormByHttpRequest returns a BaseImmunization created with the params received

type Invitation

type Invitation struct {
	ID        string        `json:"@id" bson:"@id"`
	Type      string        `json:"@type" bson:"@type"`
	Label     string        `json:"label,omitempty" bson:"label,omitempty"`
	Goal      string        `json:"goal,omitempty" bson:"goal,omitempty"`
	GoalCode  string        `json:"goal-code,omitempty" bson:"goal-code,omitempty"`
	Service   []interface{} `json:"serviceClient" bson:"serviceClient"`
	Protocols []string      `json:"protocols" bson:"protocols"`
}

type InvitationAcceptationRequest

type InvitationAcceptationRequest struct {
	InvitationUhcId        string  `json:"invitationUhcId" bson:"invitationUhcId"`
	Password               string  `json:"password" bson:"password"`
	InvitedPublicKey       string  `bson:"invitedPublicKey,omitempty" json:"invitedPublicKey,omitempty"`
	InvitedEncryptionKeyId *string `json:"invitedEncryptionKeyId" bson:"invitedEncryptionKeyId"`
}

type InvitationCreationRequest

type InvitationCreationRequest struct {
	Type                     string  `json:"type" bson:"type"`
	Label                    string  `json:"label,omitempty" bson:"label,omitempty"`
	Goal                     string  `json:"goal,omitempty" bson:"goal,omitempty"`
	GoalCode                 string  `json:"goal-code,omitempty" bson:"goal-code,omitempty"`
	Password                 string  `json:"password" bson:"password"`
	InitiatorUserId          string  `json:"initiatorUserId" bson:"initiatorUserId"`
	InvitedUserId            string  `json:"invitedUserId" bson:"invitedUserId"`
	InitiatorPublicKey       string  `bson:"initiatorPublicKey,omitempty" json:"initiatorPublicKey,omitempty"`
	InitiatorEncryptionKeyId *string `json:"initiatorEncryptionKeyId" bson:"initiatorEncryptionKeyId"`
}

type InvitationUHC

type InvitationUHC struct {
	ID                        string                     `json:"id" bson:"id"`
	ShortId                   string                     `json:"shortId" bson:"shortId"`
	Type                      string                     `json:"type" bson:"type"`
	Label                     string                     `json:"label,omitempty" bson:"label,omitempty"`
	Goal                      string                     `json:"goal,omitempty" bson:"goal,omitempty"`
	GoalCode                  string                     `json:"goal-code,omitempty" bson:"goal-code,omitempty"`
	Protocols                 []string                   `json:"protocols" bson:"protocols"`
	Password                  string                     `json:"password" bson:"password"`
	Status                    string                     `json:"status" bson:"status"`
	InitiatorUserId           string                     `json:"initiatorUserId,omitempty" bson:"initiatorUserId,omitempty"`
	InvitedUserId             string                     `json:"invitedUserId,omitempty" bson:"invitedUserId,omitempty"`
	CreatedAt                 *time.Time                 `json:"createdAt" bson:"createdAt"`
	UpdatedAt                 *time.Time                 `json:"updatedAt" bson:"updatedAt"`
	EncryptionRequirements    EncryptionRequirements     `json:"encryptionRequirements" bson:"encryptionRequirements"`
	ExternalInvitationDetails *ExternalInvitationDetails `json:"externalInvitationDetails,omitempty" bson:"externalInvitationDetails,omitempty"`
	ReadStatus                string                     `json:"readStatus,omitempty" bson:"readStatus,omitempty"`
}

type InvitationUHCResponse

type InvitationUHCResponse struct {
	Code    int             `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64           `bson:"count,omitempty" json:"count,omitempty"`
	Message string          `bson:"message,omitempty" json:"message,omitempty"`
	Data    []InvitationUHC `bson:"data,omitempty" json:"data,omitempty"`
	Token   Token           `bson:"token,omitempty" json:"token,omitempty"`
}

type JWMPayload

type JWMPayload struct {
	Protected  string `json:"protected" bson:"protected"`
	IV         string `json:"iv" bson:"iv"`
	Ciphertext string `json:"ciphertext" bson:"ciphertext"`
	Tag        string `json:"tag" bson:"tag"`
}

type Key

type Key struct {
	ID               string     `bson:"id,omitempty" json:"id,omitempty"`
	WalletKeyId      string     `bson:"walletKeyId,omitempty" json:"walletKeyId,omitempty"` // Parent Wallet ID
	Tag              string     `bson:"tag,omitempty" json:"tag,omitempty"`
	Purposes         []string   `bson:"capability,omitempty" json:"capability,omitempty"` // TODO: Change to []string
	Type             string     `bson:"type,omitempty" json:"type,omitempty"`
	Usage            string     `bson:"usage,omitempty" json:"usage,omitempty"`
	PublicKeyBase64  string     `bson:"publicKeyBase64,omitempty" json:"publicKeyBase64,omitempty"`
	PrivateKeyBase64 string     `bson:"privateKeyBase64,omitempty" json:"privateKeyBase64,omitempty"`
	CreatedAt        *time.Time `bson:"createdAt,omitempty" json:"createdAt,omitempty"`
	UpdatedAt        *time.Time `bson:"updatedAt,omitempty" json:"updatedAt,omitempty"`
	ControllerDID    string     `bson:"controllerDid,omitempty" json:"controllerDid,omitempty"` // "did:v1:uuid:" + uhcUserId
	PublicKeyDID     string     `bson:"publicKeyDid,omitempty" json:"publicKeyDid,omitempty"`   // "did:v1:uuid:" + uhcUserId + "#" + Key.ID
	Expires          *time.Time `bson:"expires,omitempty" json:"expires,omitempty"`
	Revoked          *time.Time `bson:"revoked,omitempty" json:"revoked,omitempty"`
}

type KeyCreationOrganizationRequest

type KeyCreationOrganizationRequest struct {
	OrganizationId string  `bson:"organizationId,omitempty" json:"organizationId,omitempty"`
	AccessPassword *string `bson:"accessPassword,omitempty" json:"accessPassword,omitempty"`
	Tag            string  `bson:"tag,omitempty" json:"tag,omitempty"`
	Usage          string  `bson:"usage,omitempty" json:"usage,omitempty"`
}

type KeyCreationRequest

type KeyCreationRequest struct {
	AccessPassword string `bson:"accessPassword,omitempty" json:"accessPassword,omitempty"`
	Tag            string `bson:"tag,omitempty" json:"tag,omitempty"`
	Usage          string `bson:"usage,omitempty" json:"usage,omitempty"`
}

type KeyEncryptedRetrieval added in v1.0.85

type KeyEncryptedRetrieval struct {
	ActiveKeysEncrypted string `bson:"activeKeysEncrypted,omitempty" json:"activeKeysEncrypted,omitempty"`
}

type KeyEncryptedRetrievalResponse added in v1.0.85

type KeyEncryptedRetrievalResponse struct {
	Code    int                     `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64                   `bson:"count,omitempty" json:"count,omitempty"`
	Message string                  `bson:"message,omitempty" json:"message,omitempty"`
	Data    []KeyEncryptedRetrieval `bson:"data,omitempty" json:"data,omitempty"`
}

type KeyResponse

type KeyResponse struct {
	Code    int    `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64  `bson:"count,omitempty" json:"count,omitempty"`
	Message string `bson:"message,omitempty" json:"message,omitempty"`
	Data    []Key  `bson:"data,omitempty" json:"data,omitempty"`
}

type KeyRetrievalRequest

type KeyRetrievalRequest struct {
	AccessPassword  string `bson:"accessPassword,omitempty" json:"accessPassword,omitempty"`
	EncryptionKeyID string `bson:"encryptionKeyId,omitempty" json:"encryptionKeyId,omitempty"`
}

type KeysRetrieval added in v1.0.87

type KeysRetrieval struct {
	Keys                  []Key  `bson:"keys,omitempty" json:"keys,omitempty"`
	ActiveEncryptionKeyId string `bson:"activeEncryptionKeyId,omitempty" json:"activeEncryptionKeyId,omitempty"`
	ActiveSigningKeyId    string `bson:"activeSigningKeyId,omitempty" json:"activeSigningKeyId,omitempty"`
}

type License

type License struct {
	LicenseID string       `bson:"id,omitempty" json:"id,omitempty"`
	Period    fhir4.Period `bson:"period,omitempty" json:"period,omitempty"`
	Type      string       `bson:"type,omitempty" json:"type,omitempty"`
	CreatedAt *time.Time   `bson:"createdAt,omitempty" json:"createdAt,omitempty"`
	UpdatedAt *time.Time   `bson:"updatedAt,omitempty" json:"updatedAt,omitempty"`
}

type MessageUHC

type MessageUHC struct {
	ID                  string `json:"id" bson:"id"`
	ConnectionUhcId     string `json:"connectionUhcId" bson:"connectionUhcId"`
	Thread              string `json:"thread" bson:"thread"`
	RespondsToMessageId string `json:"respondsToMessageId" bson:"respondsToMessageId"`
	Type                string `json:"type" bson:"type"`
	Label               string `json:"label" bson:"label"`
	FromUserId          string `json:"fromUserId,omitempty" bson:"fromUserId,omitempty"`
	FromOrganizationId  string `json:"fromOrganizationId,omitempty" bson:"fromOrganizationId,omitempty"`

	ToUserId   string      `json:"toUserId,omitempty" bson:"toUserId,omitempty"`
	JWMPayload *JWMPayload `json:"jwmPayload" bson:"jwmPayload"`
	UHCPayload *UHCPayload `json:"uhcPayload" bson:"uhcPayload"`
	CreatedAt  *time.Time  `json:"createdAt" bson:"createdAt"`
	Status     string      `json:"status" bson:"status"`
}

type MessageUHCResponse

type MessageUHCResponse struct {
	Code    int          `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64        `bson:"count,omitempty" json:"count,omitempty"`
	Message string       `bson:"message,omitempty" json:"message,omitempty"`
	Data    []MessageUHC `bson:"data,omitempty" json:"data,omitempty"`
	Token   Token        `bson:"token,omitempty" json:"token,omitempty"`
}

type OrganizationPermission

type OrganizationPermission struct {
	OrganizationId   string     `bson:"organizationId,omitempty" json:"organizationId,omitempty"`
	OrganizationRole string     `bson:"organizationRole,omitempty" json:"organizationRole,omitempty"`
	ConfirmedRole    bool       `bson:"confirmedRole" json:"confirmedRole"`
	CreatedAt        *time.Time `json:"createdAt" bson:"createdAt"`
}

Practitioner can be: administrative, driver, director, techoperator, researcher, pharmacist, doctor, nurse, paramedic, fireman, policeman ...

type OrganizationPublicUHCExtensions

type OrganizationPublicUHCExtensions struct {
	AppId                       string      `bson:"appId,omitempty" json:"appId,omitempty"`
	DescriptionI18n             *[]I18nText `bson:"description~i18n,omitempty" json:"description~i18n,omitempty"`
	Tags                        *[]string   `bson:"tags,omitempty" json:"tags,omitempty"`
	LogoUrl                     string      `bson:"logoUrl,omitempty" json:"logoUrl,omitempty"`
	OrganizationImageDocumentId string      `bson:"organizationImageDocumentId,omitempty" json:"organizationImageDocumentId,omitempty"`
	OrganizationId              string      `bson:"organizationId,omitempty" json:"organizationId,omitempty"`
	ActiveTermsAndConditionsId  string      `bson:"termsAndConditionsId,omitempty" json:"termsAndConditionsId,omitempty"`
}

type OrganizationUHC

type OrganizationUHC struct {
	ID                  string                           `bson:"id,omitempty" json:"id,omitempty"`
	ActiveCredentialID  string                           `bson:"activeCredential,omitempty" json:"activeCredential,omitempty"`
	FhirOrganization    *fhir4.Organization              `bson:"fhir,omitempty" json:"fhir,omitempty"`
	UhcPublicExtensions *OrganizationPublicUHCExtensions `bson:"uhcPublicExtensions,omitempty" json:"uhcPublicExtensions,omitempty"` //dlt: no
}

type OrganizationUHCAccess

type OrganizationUHCAccess struct {
	ID                              string                   `bson:"id,omitempty" json:"id,omitempty"`
	OrganizationUhcId               string                   `bson:"organizationUhcId,omitempty" json:"organizationUhcId,omitempty"`
	ActiveEncryptionKeyID           *string                  `bson:"activeEncryptionKeyID,omitempty" json:"activeEncryptionKeyID,omitempty"`
	ActiveSigningKeyID              *string                  `bson:"activeSigningKeyID,omitempty" json:"activeSigningKeyID,omitempty"`
	ActiveOrganizationAccessTokenId *string                  `bson:"activeOrganizationAccessTokenId,omitempty" json:"activeOrganizationAccessTokenId,omitempty"`
	ApplicationsLicenses            *[]ApplicationLicense    `bson:"ApplicationsLicenses,omitempty" json:"applications,omitempty"`
	ApplicationsPermissions         *[]ApplicationPermission `bson:"applicationsPermissions,omitempty" json:"applicationsPermissions,omitempty"`
}

type OrganizationUHCResponse

type OrganizationUHCResponse struct {
	Code    int               `bson:"code,omitempty" json:"code,omitempty"`
	Message string            `bson:"message,omitempty" json:"message,omitempty"`
	Data    []OrganizationUHC `bson:"data,omitempty" json:"data,omitempty"`
	Token   Token             `bson:"token,omitempty" json:"token,omitempty"`
}

type OrganizationUHCToken

type OrganizationUHCToken struct {
	ID                      string                   `json:"id,omitempty" bson:"id,omitempty"`
	DeviceId                string                   `json:"deviceId,omitempty" bson:"deviceId,omitempty"`
	Token                   string                   `json:"token,omitempty" bson:"token,omitempty"`
	OrganizationOwnerId     string                   `json:"organizationOwnerId,omitempty" bson:"organizationOwnerId,omitempty"`
	ApplicationsPermissions *[]ApplicationPermission `bson:"applicationsPermissions,omitempty" json:"applicationsPermissions,omitempty"`
	CreatedAt               *time.Time               `bson:"createdAt,omitempty" json:"createdAt,omitempty"`
	UpdatedAt               *time.Time               `bson:"updatedAt,omitempty" json:"updatedAt,omitempty"`
	Status                  string                   `bson:"status,omitempty" json:"status,omitempty"`
}

func (*OrganizationUHCToken) AddOrUpdateAccessToService

func (organizationUhcToken *OrganizationUHCToken) AddOrUpdateAccessToService(serviceName string, role string)

func (*OrganizationUHCToken) GetApplicationPermission

func (organizationUhcToken *OrganizationUHCToken) GetApplicationPermission(serviceName string) (*ApplicationPermission, error)

func (*OrganizationUHCToken) RoleAccessToService

func (organizationUhcToken *OrganizationUHCToken) RoleAccessToService(serviceName string) string

type OrganizationUHCTokenResponse

type OrganizationUHCTokenResponse struct {
	Code    int                    `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64                  `bson:"count,omitempty" json:"count,omitempty"`
	Message string                 `bson:"message,omitempty" json:"message,omitempty"`
	Data    []OrganizationUHCToken `bson:"data,omitempty" json:"data,omitempty"`
}

type OrganizationVC

type OrganizationVC struct {
	Context        []string              `bson:"@context,omitempty" json:"@context,omitempty"`
	ID             string                `bson:"id,omitempty" json:"id,omitempty"`
	Subject        FhirCredentialSubject `bson:"credentialSubject,omitempty" json:"credentialSubject,omitempty"`
	Type           []string              `bson:"type,omitempty" json:"type,omitempty"`
	Issuer         verifiable.Issuer     `bson:"issuer,omitempty" json:"issuer,omitempty"`
	Issued         *time.Time            `bson:"issuanceDate,omitempty" json:"issuanceDate,omitempty"`
	Expired        *time.Time            `bson:"expirationDate,omitempty" json:"expirationDate,omitempty"`
	ListOfProof    []proof.Proof         `bson:"proof,omitempty" json:"proof,omitempty"`
	Status         *verifiable.TypedID   `bson:"credentialStatus,omitempty" json:"credentialStatus,omitempty"`
	Schemas        []verifiable.TypedID  `bson:"credentialSchema,omitempty" json:"credentialSchema,omitempty"`
	TermsOfUse     []verifiable.TypedID  `bson:"termsOfUse,omitempty" json:"termsOfUse,omitempty"`
	RefreshService []verifiable.TypedID  `bson:"refreshService,omitempty" json:"refreshService,omitempty"`
}

type OrganizationVCResponse

type OrganizationVCResponse struct {
	Code    int              `bson:"code,omitempty" json:"code,omitempty"`
	Message string           `bson:"message,omitempty" json:"message,omitempty"`
	Data    []OrganizationVC `bson:"data,omitempty" json:"data,omitempty"`
}

type OrganizationVP

type OrganizationVP struct {
	Context               []string         `bson:"@context,omitempty" json:"@context,omitempty"`
	ID                    string           `bson:"id,omitempty" json:"id,omitempty"`
	Type                  []string         `bson:"type,omitempty" json:"type,omitempty"`
	VerifiableCredentials []OrganizationVC `bson:"verifiableCredential,omitempty" json:"verifiableCredential,omitempty"`
	Holder                string           `bson:"holder,omitempty" json:"holder,omitempty"`
	ListOfProof           []proof.Proof    `bson:"proof,omitempty" json:"proof,omitempty"`
}

type PermissionUHCAccessRequest

type PermissionUHCAccessRequest struct {
	Permissions []PermissionsUHC `json:"permissions" bson:"permissions"`
	Until       time.Time        `json:"until" bson:"until"`
}

type PermissionsRequestUHC

type PermissionsRequestUHC struct {
	ID                   string            `json:"id" bson:"id"`
	ConnectionId         string            `json:"connectionId" bson:"connectionId"`
	PermissionsRequested *[]PermissionsUHC `json:"permissionsRequested" bson:"permissionsRequested"`
	ActiveUntil          *time.Time        `json:"activeUntil" bson:"activeUntil"`
	Goal                 string            `json:"goal" bson:"goal"`
	Status               string            `json:"status" bson:"status"`
}

type PermissionsUHC

type PermissionsUHC struct {
	AccessCode string `json:"accessCode" bson:"accessCode"`
	Active     *bool  `json:"active" bson:"active"`
	Goal       string `json:"goal" bson:"goal"`
}

type PresentationWithBundleInVC added in v1.0.77

type PresentationWithBundleInVC struct {
	Context      []string         `json:"@context,omitempty"`
	ID           string           `json:"id,omitempty" bson:"id,omitempty"`
	Type         []string         `json:"type,omitempty bson:"type,omitempty"" `
	Holder       string           `json:"holder,omitempty" bson:"holder,omitempty"`
	Proof        []proof.Proof    `json:"proof,omitempty" bson:"proof,omitempty"`
	CustomFields CustomFields     `json:"-" bson:"customFields,omitempty"` // All unmapped fields are put here.
	Credential   []CredentialFHIR `json:"verifiableCredential bson:"verifiableCredential,omitempty""`
}

type PublicInfoFromActiveKey

type PublicInfoFromActiveKey struct {
	ID              string     `bson:"id,omitempty" json:"id,omitempty"`
	Tag             string     `bson:"tag,omitempty" json:"tag,omitempty"`
	OwnerUserId     string     `bson:"ownerUserId,omitempty" json:"ownerUserId,omitempty"`
	PublicKeyBase64 string     `bson:"publicKeyBase64,omitempty" json:"publicKeyBase64,omitempty"`
	CreatedAt       *time.Time `bson:"createdAt,omitempty" json:"createdAt,omitempty"`
	UpdatedAt       *time.Time `bson:"updatedAt,omitempty" json:"updatedAt,omitempty"`
}

type PublicInfoFromKeyResponse

type PublicInfoFromKeyResponse struct {
	Code    int                       `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64                     `bson:"count,omitempty" json:"count,omitempty"`
	Message string                    `bson:"message,omitempty" json:"message,omitempty"`
	Data    []PublicInfoFromActiveKey `bson:"data,omitempty" json:"data,omitempty"`
}

type PushToken

type PushToken struct {
	Token        string    `json:"token,omitempty" bson:"token,omitempty"`
	Os           string    `json:"os,omitempty" bson:"os,omitempty"`
	RegisterDate time.Time `json:"registerDate,omitempty" bson:"registerDate,omitempty"`
}

type PushTokensUHCResponse

type PushTokensUHCResponse struct {
	Code         int             `json:"code,omitempty" bson:"code,omitempty"`
	Message      string          `json:"message,omitempty" bson:"message,omitempty"`
	DataResponse []UserTokensUHC `json:"data,omitempty" bson:"data,omitempty"`
	Count        int64           `json:"count,omitempty" bson:"count,omitempty"`
}

type Rate

type Rate struct {
	RateDate   time.Time `json:"rateDate,omitempty" bson:"rateDate,omitempty"`
	Stars      int       `json:"stars,omitempty" bson:"stars,omitempty"`
	Suggestion string    `json:"suggestion,omitempty" bson:"suggestion,omitempty"`
	AppId      string    `json:"appId,omitempty" bson:"appId,omitempty"`
}

type Service

type Service struct {
	BackendUrl   string
	ServiceRoute string
	Token        string
	ServiceToken string
	RefreshToken string
}

type SharedKey

type SharedKey struct {
	EncryptionKeyId    *string `bson:"encryptionKeyId,omitempty" json:"encryptionKeyId,omitempty"`
	OtherPartPublicKey string  `bson:"otherPartPublicKey,omitempty" json:"otherPartPublicKey,omitempty"`
	SharedKey          string  `bson:"sharedKey,omitempty" json:"sharedKey,omitempty"`
}

type SharedKeyCreationRequest

type SharedKeyCreationRequest struct {
	EncryptionKeyId    *string `bson:"encryptionKeyId,omitempty" json:"encryptionKeyId,omitempty"`
	OtherPartPublicKey string  `bson:"otherPartPublicKey,omitempty" json:"otherPartPublicKey,omitempty"`
	AccessPassword     string  `bson:"accessPassword,omitempty" json:"accessPassword,omitempty"`
}

type SharedKeyResponse

type SharedKeyResponse struct {
	Code    int    `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64  `bson:"count,omitempty" json:"count,omitempty"`
	Message string `bson:"message,omitempty" json:"message,omitempty"`

	Data []SharedKey `bson:"data,omitempty" json:"data,omitempty"`
}

type TermsAndConditions

type TermsAndConditions struct {
	Text          string    `bson:"text,omitempty" json:"text,omitempty"`
	CreationDate  time.Time `bson:"creationDate,omitempty" json:"creationDate,omitempty"`
	Version       string    `bson:"version,omitempty" json:"version,omitempty"`
	ID            string    `bson:"id,omitempty" json:"id,omitempty"`
	ActiveVersion bool      `bson:"activeVersion,omitempty" json:"activeVersion,omitempty"`
	Type          string    `bson:"type,omitempty" json:"type,omitempty"`
}

type TermsAndConditionsResponse

type TermsAndConditionsResponse struct {
	Code    int                  `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64                `bson:"count,omitempty" json:"count,omitempty"`
	Message string               `bson:"message,omitempty" json:"message,omitempty"`
	Data    []TermsAndConditions `bson:"data,omitempty" json:"data,omitempty"`
	Token   Token                `bson:"token,omitempty" json:"token,omitempty"`
}

type Token

type Token struct {
	UserId   string `bson:"userId,omitempty" json:"userId,omitempty"`
	Username string `bson:"username,omitempty" json:"username,omitempty"`
	jwt.StandardClaims
	Role                   []string                 `bson:"role,omitempty" json:"role,omitempty"`
	OrganizationPermission []OrganizationPermission `bson:"organizationPermission,omitempty" json:"organizationPermission,omitempty"`
}

type UHCPayload

type UHCPayload struct {
	PayloadBase64    string `json:"payloadBase64" bson:"payloadBase64"`
	EncryptedPayload bool   `json:"encryptedPayload" bson:"encryptedPayload"`
}

type User

type User struct {
	AppId   string `bson:"appId,omitempty" json:"appId,omitempty"`
	LogoUrl string `bson:"logoUrl,omitempty" json:"logoUrl,omitempty"`

	ID       string `bson:"id,omitempty" json:"id,omitempty"`
	Username string `bson:"username,omitempty" json:"username,omitempty"`
	Password string `bson:"password,omitempty" json:"password,omitempty"`

	Token                       string  `bson:"token,omitempty" json:"token,omitempty"`
	RefreshToken                string  `bson:"refreshToken,omitempty" json:"refreshToken,omitempty"`
	ConfirmationAccountToken    *string `bson:"confirmationAccountToken" json:"confirmationAccountToken"`
	ImplicitInvitationToken     *string `bson:"implicitInvitationToken" json:"implicitInvitationToken"`
	ConfirmationAccountAttempts int     `bson:"confirmationAccountAttempts" json:"confirmationAccountAttempts"`
	RecoverAccountToken         *string `bson:"recoverAccountToken" json:"recoverAccountToken"`
	RecoverAccountAttempts      int     `bson:"recoverAccountAttempts" json:"recoverAccountAttempts"`
	ConfirmedAccount            bool    `bson:"confirmedAccount,omitempty" json:"confirmedAccount,omitempty"`
	InvitedUser                 bool    `bson:"invitedUser,omitempty" json:"invitedUser,omitempty"`

	Email             string `bson:"email,omitempty" json:"email,omitempty"`
	FirstName         string `bson:"firstName,omitempty" json:"firstName,omitempty"`
	LastName          string `bson:"lastName,omitempty" json:"lastName,omitempty"`
	PreferredLanguage string `bson:"preferredLanguage,omitempty" json:"preferredLanguage,omitempty"`

	Role                   []string                 `bson:"role,omitempty" json:"role,omitempty"`
	OrganizationPermission []OrganizationPermission `bson:"organizationPermission,omitempty" json:"organizationPermission,omitempty"`
}

type UserConfigUHC

type UserConfigUHC struct {
	Type                       string                      `json:"type,omitempty" bson:"type,omitempty"`
	UhcID                      string                      `json:"uhcId,omitempty" bson:"uhcId,omitempty"`
	BlockchainID               string                      `json:"blockchainUserId,omitempty" bson:"blockchainUserId,omitempty"`
	ExternalIDs                []UserExternalID            `json:"externalIds,omitempty" bson:"externalIds,omitempty"`
	FavoriteLocationUHCIDs     []string                    `json:"favoriteLocationUhcIds,omitempty" bson:"favoriteLocationUhcIds,omitempty"`
	AcceptedTermsAndConditions []AcceptedTermsAndCondition `json:"acceptedTermsAndConditions,omitempty" bson:"acceptedTermsAndConditions,omitempty"`
	Ratings                    []Rate                      `json:"ratings,omitempty" bson:"ratings,omitempty"`
	UserContacts               []UserContact               `json:"userContacts,omitempty" bson:"userContacts,omitempty"`
}

type UserConfigUHCResponse

type UserConfigUHCResponse struct {
	Code         int             `json:"code,omitempty" bson:"code,omitempty"`
	Message      string          `json:"message,omitempty" bson:"message,omitempty"`
	DataResponse []UserConfigUHC `json:"data,omitempty" bson:"data,omitempty"`
	Count        int64           `json:"count,omitempty" bson:"count,omitempty"`
}

type UserContact

type UserContact struct {
	UserUhcId string `json:"userUhcId,omitempty" bson:"userUhcId,omitempty"`
	Tag       string `json:"tag,omitempty" bson:"tag,omitempty"`
}

type UserContactComplete

type UserContactComplete struct {
	User User   `bson:"user,omitempty" json:"user,omitempty"`
	Tag  string `bson:"tag,omitempty" json:"tag,omitempty"`
}

type UserContactsResponse

type UserContactsResponse struct {
	Code         int                   `json:"code,omitempty" bson:"code,omitempty"`
	Message      string                `json:"message,omitempty" bson:"message,omitempty"`
	DataResponse []UserContactComplete `json:"data,omitempty" bson:"data,omitempty"`
	Count        int64                 `json:"count,omitempty" bson:"count,omitempty"`
}

type UserDeletionRequest

type UserDeletionRequest struct {
	ID            string `bson:"id,omitempty" json:"id,omitempty"`
	Username      string `bson:"username,omitempty" json:"username,omitempty"`
	DeletionToken string `bson:"deletionToken,omitempty" json:"deletionToken,omitempty"`
	Password      string `bson:"password,omitempty" json:"password,omitempty"`
	Email         string `bson:"email,omitempty" json:"email,omitempty"`
}

type UserExternalCreationRequest

type UserExternalCreationRequest struct {
	Email                      string `bson:"email,omitempty" json:"email,omitempty"`
	PhoneNumber                string `bson:"phoneNumber,omitempty" json:"phoneNumber,omitempty"`
	IdentificationDocumentCode string `bson:"identificationDocumentCode,omitempty" json:"identificationDocumentCode,omitempty"`
	IdentificationDocumentType string `bson:"identificationDocumentType,omitempty" json:"identificationDocumentType,omitempty"`
}

type UserExternalID

type UserExternalID struct {
	Type    string `json:"type,omitempty" bson:"type,omitempty"`       //public or pairwise
	Profile string `json:"profile,omitempty" bson:"profile,omitempty"` //health, education...
	UUID    string `json:"uuid,omitempty" bson:"uuid,omitempty"`
}

type UserRegisterRequest added in v1.0.73

type UserRegisterRequest struct {
	Username      string `bson:"username,omitempty" json:"username,omitempty"`
	FirstName     string `bson:"firstName,omitempty" json:"firstName,omitempty"`
	LastName      string `bson:"lastName,omitempty" json:"lastName,omitempty"`
	Email         string `bson:"email,omitempty" json:"email,omitempty"`
	AppId         string `bson:"appId,omitempty" json:"appId,omitempty"`
	LoginPassword string `bson:"loginPassword,omitempty" json:"loginPassword,omitempty"`
}

type UserRegisterV3ByUserRequest added in v1.0.95

type UserRegisterV3ByUserRequest struct {
	Username      string `bson:"username,omitempty" json:"username,omitempty"`
	FirstName     string `bson:"firstName,omitempty" json:"firstName,omitempty"`
	LastName      string `bson:"lastName,omitempty" json:"lastName,omitempty"`
	Email         string `bson:"email,omitempty" json:"email,omitempty"`
	AppId         string `bson:"appId,omitempty" json:"appId,omitempty"`
	LoginPassword string `bson:"loginPassword,omitempty" json:"loginPassword,omitempty"`
	RoleInOrg     string `bson:"roleInOrg,omitempty" json:"roleInOrg,omitempty"`
}

type UserResponse

type UserResponse struct {
	Code    int    `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64  `bson:"count,omitempty" json:"count,omitempty"`
	Message string `bson:"message,omitempty" json:"message,omitempty"`
	Data    []User `bson:"data,omitempty" json:"data,omitempty"`
	Token   Token  `bson:"token,omitempty" json:"token,omitempty"`
}

func (*UserResponse) ReturnCustomResponse

func (userResponse *UserResponse) ReturnCustomResponse(w http.ResponseWriter, code int, customCode int, customMessage string, data *[]User)

type UserTokensUHC

type UserTokensUHC struct {
	UhcID      string      `json:"uhcId,omitempty" bson:"uhcId,omitempty"`
	PushTokens []PushToken `json:"pushTokens,omitempty" bson:"pushTokens,omitempty"`
}

type W3CPublicKeyExport

type W3CPublicKeyExport struct {
	IdWithDid       string     `bson:"id,omitempty" json:"id,omitempty"`                 // Identifier of this public key in the owner's blockchain DID document
	Controller      string     `bson:"controller,omitempty" json:"controller,omitempty"` // didID already included in 'id'
	Type            string     `bson:"type,omitempty" json:"type,omitempty"`             // "Ed25519VerificationKey2018""
	Expires         *time.Time `bson:"expires,omitempty" json:"expires,omitempty"`
	Revoked         *time.Time `bson:"revoked,omitempty" json:"revoked,omitempty"`
	PublicKeyBase64 string     `bson:"publicKeyBase64,omitempty" json:"publicKeyBase64,omitempty"`
	Context         []string   `bson:"@context,omitempty" json:"@context,omitempty"`               // "@context": ["https://w3id.org/security/v2"]
	PublicKeyBase58 string     `bson:"publicKeyBase58,omitempty" json:"publicKeyBase58,omitempty"` // standard
}

Standard expected properties: id (did#id), type, controller, publicKeyBase58 (https://w3c-ccg.github.io/security-vocab/)

type WalletKey

type WalletKey struct {
	AccessPassword                    string     `bson:"accessPassword,omitempty" json:"accessPassword,omitempty"`
	ID                                string     `bson:"id,omitempty" json:"id,omitempty"`
	ControllerDID                     string     `bson:"did,omitempty" json:"did,omitempty"`
	RecoverCode                       string     `bson:"recoverCode,omitempty" json:"recoverCode,omitempty"`
	OwnerId                           string     `bson:"ownerId,omitempty" json:"ownerId,omitempty"`
	OwnerType                         string     `bson:"ownerType,omitempty" json:"ownerType,omitempty"`
	Type                              string     `bson:"type,omitempty" json:"type,omitempty"`
	CreatedAt                         *time.Time `bson:"createdAt,omitempty" json:"createdAt,omitempty"`
	UpdatedAt                         *time.Time `bson:"updatedAt,omitempty" json:"updatedAt,omitempty"`
	ActiveEncryptionKeyId             *string    `bson:"activeEncryptionKey,omitempty" json:"activeEncryptionKey,omitempty"`
	ActiveSigningKeyId                *string    `bson:"activeSingingKey,omitempty" json:"activeSingingKey,omitempty"`
	MultifactorAuthCode               *string    `bson:"multifactorAuthCode,omitempty" json:"multifactorAuthCode,omitempty"`
	MultifactorAuthCodeGenerationDate *time.Time `bson:"multifactorAuthCodeGenerationDate,omitempty" json:"multifactorAuthCodeGenerationDate,omitempty"`
}

type WalletKeyResponse

type WalletKeyResponse struct {
	Code    int         `bson:"code,omitempty" json:"code,omitempty"`
	Count   int64       `bson:"count,omitempty" json:"count,omitempty"`
	Message string      `bson:"message,omitempty" json:"message,omitempty"`
	Data    []WalletKey `bson:"data,omitempty" json:"data,omitempty"`
}

type WalletPasswordChangeRequest

type WalletPasswordChangeRequest struct {
	NewPassword string `bson:"newPassword,omitempty" json:"newPassword,omitempty"`
	OwnerUserId string `bson:"ownerUserId,omitempty" json:"ownerUserId,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL