Documentation ¶
Index ¶
- Constants
- func ComposeOneHealthEpisodeOfCare(validPhone string, fullAccess bool, ...) domain.FHIREpisodeOfCare
- func ContactsToContactPoint(_ context.Context, phones []*domain.PhoneNumberInput, ...) ([]*domain.FHIRContactPoint, error)
- func IDToIdentifier(ids []*domain.IdentificationDocument, phones []*domain.PhoneNumberInput) ([]*domain.FHIRIdentifierInput, error)
- func LanguagesToCommunicationInputs(languages []enumutils.Language) []*domain.FHIRPatientCommunicationInput
- func MaritalStatusEnumToCodeableConcept(val domain.MaritalStatus) *domain.FHIRCodeableConcept
- func MaritalStatusEnumToCodeableConceptInput(val domain.MaritalStatus) *domain.FHIRCodeableConceptInput
- func NameToHumanName(names []*domain.NameInput) []*domain.FHIRHumanNameInput
- func ParseDate(date string) time.Time
- func PhysicalPostalAddressesToCombinedFHIRAddress(physical []*domain.PhysicalAddress, postal []*domain.PostalAddress) *domain.FHIRAddressInput
- func PhysicalPostalAddressesToFHIRAddresses(physical []*domain.PhysicalAddress, postal []*domain.PostalAddress) []*domain.FHIRAddressInput
- func ValidateEmail(email string, _ bool, _ *firestore.Client) error
Constants ¶
const ( // CenturyHours is the number of hours in a (fictional) century of leap years CenturyHours = 878400 // StringTimeParseMonthNameLayout ... StringTimeParseMonthNameLayout = "2006-Jan-02" // StringTimeParseMonthNumberLayout ... StringTimeParseMonthNumberLayout = "2006-01-02" )
const ( DefaultCountry = "ke" IDIdentifierSystem = "healthcloud.iddocument" MSISDNIdentifierSystem = "healthcloud.msisdn" DefaultVersion = "0.0.1" )
simple patient registration defaults should be reviewed later (ticket created)
Variables ¶
This section is empty.
Functions ¶
func ComposeOneHealthEpisodeOfCare ¶
func ComposeOneHealthEpisodeOfCare( validPhone string, fullAccess bool, organizationID, providerCode, patientID string, ) domain.FHIREpisodeOfCare
ComposeOneHealthEpisodeOfCare is used to create an episode of care
func ContactsToContactPoint ¶
func ContactsToContactPoint( _ context.Context, phones []*domain.PhoneNumberInput, emails []*domain.EmailInput, firestoreClient *firestore.Client, ) ([]*domain.FHIRContactPoint, error)
ContactsToContactPoint translates phone and email contacts to FHIR contact points
func IDToIdentifier ¶
func IDToIdentifier( ids []*domain.IdentificationDocument, phones []*domain.PhoneNumberInput) ([]*domain.FHIRIdentifierInput, error)
IDToIdentifier translates simple identification document details to FHIR identifiers
func LanguagesToCommunicationInputs ¶
func LanguagesToCommunicationInputs(languages []enumutils.Language) []*domain.FHIRPatientCommunicationInput
LanguagesToCommunicationInputs translates the supplied languages to FHIR communication preferences
func MaritalStatusEnumToCodeableConcept ¶
func MaritalStatusEnumToCodeableConcept(val domain.MaritalStatus) *domain.FHIRCodeableConcept
MaritalStatusEnumToCodeableConcept turns the simple enum selected in the user interface to a FHIR codeable concept
func MaritalStatusEnumToCodeableConceptInput ¶
func MaritalStatusEnumToCodeableConceptInput(val domain.MaritalStatus) *domain.FHIRCodeableConceptInput
MaritalStatusEnumToCodeableConceptInput turns the simple enum selected in the user interface to a FHIR codeable concept
func NameToHumanName ¶
func NameToHumanName(names []*domain.NameInput) []*domain.FHIRHumanNameInput
NameToHumanName translates the simple name input of simple patient registration to FHIR human names
func ParseDate ¶
ParseDate parses a formatted string and returns the time value it represents Try different layout due to Inconsistent date formats They include "2018-01-01", "2020-09-24T18:02:38.661033Z", "2018-Jan-01"
func PhysicalPostalAddressesToCombinedFHIRAddress ¶
func PhysicalPostalAddressesToCombinedFHIRAddress( physical []*domain.PhysicalAddress, postal []*domain.PostalAddress, ) *domain.FHIRAddressInput
PhysicalPostalAddressesToCombinedFHIRAddress translates address inputs to a single FHIR address.
It is used for patient contacts (e.g next of kin) where the spec has only one address per next of kin.
func PhysicalPostalAddressesToFHIRAddresses ¶
func PhysicalPostalAddressesToFHIRAddresses( physical []*domain.PhysicalAddress, postal []*domain.PostalAddress) []*domain.FHIRAddressInput
PhysicalPostalAddressesToFHIRAddresses translates address inputs to FHIR addresses
Types ¶
This section is empty.