ncpdp

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 9 Imported by: 0

README

codecov

NCPDP Script 2017071

Usage

See tests for more usage examples.

The decoder accepts an io.Reader and can decode xml to a *Message or json.

Decode NewRx (xml) file:

file, err := os.Open("testdata/sample-newrx.xml")
if err != nil {
    log.Fatal(err)
}
defer file.Close()

script := ncpdp.NewDecoder(file)
message, err := script.Decode()
if err != nil {
    log.Fatal(err)
}

fmt.Printf("%+v\n", message.Body.NewRx)

Get JSON representation:


message, err := script.ToJson()
if err != nil {
    log.Fatal(err)
}

fmt.Printf("%+v\n", string(message))

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed NCPDPTerminology.txt
	NCPDPTerminologyDataFile []byte

	//go:embed Loinc.csv
	LoincDataFile []byte
)

Functions

This section is empty.

Types

type Address

type Address struct {
	XMLName       xml.Name `xml:"Address" json:"-"`
	AddressLine1  string   `xml:"AddressLine1" json:"address_line_1,omitempty"`
	AddressLine2  string   `xml:"AddressLine2" json:"address_line_2,omitempty"`
	City          string   `xml:"City" json:"city,omitempty"`
	StateProvince string   `xml:"StateProvince" json:"state_province,omitempty"`
	PostalCode    string   `xml:"PostalCode" json:"postal_code,omitempty"`
	CountryCode   string   `xml:"CountryCode" json:"country_code,omitempty"`
}

type AdministrationTiming

type AdministrationTiming struct {
	AdministrationTimingEvent UnitOfMeasure `xml:"AdministrationTimingEvent" json:"administration_timing_event,omitempty"`
}

type Allergies

type Allergies struct {
	SourceOfInformation string        `xml:"SourceOfInformation" json:"source_of_information,omitempty"`
	EffectiveDate       EffectiveDate `xml:"EffectiveDate" json:"effective_date,omitempty"`
	AdverseEvent        UnitOfMeasure `xml:"AdverseEvent" json:"adverse_event,omitempty"`
	DrugProductCoded    UnitOfMeasure `xml:"DrugProductCoded" json:"drug_product_coded,omitempty"`
}

type AllergyOrAdverseEvent

type AllergyOrAdverseEvent struct {
	NoKnownAllergies string      `xml:"NoKnownAllergies" json:"no_known_allergies,omitempty"`
	Allergies        []Allergies `xml:"Allergies" json:"allergies,omitempty"`
}

type BenefitsCoordination

type BenefitsCoordination struct {
	PayerIdentification PayerIdentification `xml:"PayerIdentification" json:"payer_identification,omitempty"`
	PayerName           string              `xml:"PayerName" json:"payer_name,omitempty"`
	CardholderID        string              `xml:"CardholderID" json:"cardholder_id,omitempty"`
	CardHolderName      *Name               `xml:"CardHolderName" json:"card_holder_name,omitempty"`
	GroupID             string              `xml:"GroupID" json:"group_id,omitempty"`
	GroupName           string              `xml:"GroupName" json:"group_name,omitempty"`
	PBMMemberID         string              `xml:"PBMMemberID" json:"pbm_member_id,omitempty"`
}

type Body

type Body struct {
	XMLName           xml.Name           `xml:"Body" json:"-"`
	NewRx             *NewRx             `xml:"NewRx" json:"new_rx,omitempty"`
	Status            *Coded             `xml:"Status" json:"status,omitempty"`
	Verify            *Verify            `xml:"Verify" json:"verify,omitempty"`
	RxRenewalRequest  *RxRenewalRequest  `xml:"RxRenewalRequest" json:"rx_renewal_request,omitempty"`
	RxRenewalResponse *RxRenewalResponse `xml:"RxRenewalResponse" json:"rx_renewal_response,omitempty"`
	CancelRx          *CancelRx          `xml:"CancelRx" json:"cancel_rx,omitempty"`
	Error             *Coded             `xml:"Error" json:"error,omitempty"`
}

type CancelRx

type CancelRx struct {
	XMLName              xml.Name   `xml:"CancelRx" json:"-"`
	Patient              Patient    `xml:"Patient" json:"patient,omitempty"`
	Pharmacy             Pharmacy   `xml:"Pharmacy" json:"pharmacy,omitempty"`
	Prescriber           Prescriber `xml:"Prescriber" json:"prescriber,omitempty"`
	MedicationPrescribed Medication `xml:"MedicationPrescribed" json:"medication_prescribed,omitempty"`
}

type CodeSystem

type CodeSystem struct {
	SNOMEDVersion string `xml:"SNOMEDVersion" json:"snomed_version,omitempty"`
	FMTVersion    string `xml:"FMTVersion" json:"fmt_version,omitempty"`
}

type Coded

type Coded struct {
	Code        string  `xml:"Code" json:"code,omitempty"`
	Qualifier   string  `xml:"Qualifier" json:"qualifier,omitempty"`
	Description *string `xml:"Description" json:"description,omitempty"`
}

type CommunicationNumbers

type CommunicationNumbers struct {
	XMLName          xml.Name   `xml:"CommunicationNumbers" json:"-"`
	PrimaryTelephone *Telephone `xml:"PrimaryTelephone" json:"primary_telephone,omitempty"`
	HomeTelephone    *Telephone `xml:"HomeTelephone" json:"home_telephone,omitempty"`
	OtherTelephone   *Telephone `xml:"OtherTelephone" json:"other_telephone,omitempty"`
	Fax              *Fax       `xml:"Fax" json:"fax,omitempty"`
	WorkTelephone    *Telephone `xml:"WorkTelephone" json:"work_telephone,omitempty"`
	ElectronicMail   string     `xml:"ElectronicMail" json:"electronic_mail,omitempty"`
}

type DEASchedule

type DEASchedule struct {
	Code string `xml:"Code" json:"code,omitempty"`
}

type Date

type Date struct {
	time.Time
}

func (*Date) UnmarshalXML

func (t *Date) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type DateOfBirth

type DateOfBirth struct {
	XMLName xml.Name `xml:"DateOfBirth" json:"-"`
	Date    Date     `xml:"Date" json:"date,omitempty"`
}

type DateTime

type DateTime struct {
	DateTime *time.Time `xml:"DateTime" json:"date_time,omitempty"`
}

type Decoder added in v1.0.0

type Decoder struct {
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) Decode added in v1.0.0

func (d *Decoder) Decode() (*Message, error)

func (*Decoder) ToJson added in v1.0.0

func (d *Decoder) ToJson() ([]byte, error)

type Diagnosis

type Diagnosis struct {
	ClinicalInformationQualifier string `xml:"ClinicalInformationQualifier" json:"clinical_information_qualifier,omitempty"`
	Primary                      Coded  `xml:"Primary" json:"primary,omitempty"`
	Secondary                    *Coded `xml:"Secondary" json:"secondary,omitempty"`
}

type DigitalSignature

type DigitalSignature struct {
	Version                   string `xml:"Version,attr" json:"version,omitempty"`
	DigitalSignatureIndicator bool   `xml:"DigitalSignatureIndicator" json:"digital_signature_indicator,omitempty"`
}

type Dosage

type Dosage struct {
	DoseQuantity      int           `xml:"DoseQuantity" json:"dose_quantity,omitempty"`
	DoseUnitOfMeasure UnitOfMeasure `xml:"DoseUnitOfMeasure" json:"dose_unit_of_measure,omitempty"`
}

type DoseAdministration

type DoseAdministration struct {
	DoseDeliveryMethod    UnitOfMeasure `xml:"DoseDeliveryMethod" json:"dose_delivery_method,omitempty"`
	Dosage                Dosage        `xml:"Dosage" json:"dosage,omitempty"`
	RouteOfAdministration UnitOfMeasure `xml:"RouteOfAdministration" json:"route_of_administration,omitempty"`
}

type DrugCoded

type DrugCoded struct {
	XMLName     xml.Name     `xml:"DrugCoded" json:"-"`
	ProductCode Coded        `xml:"ProductCode" json:"product_code,omitempty"`
	Strength    *Strength    `xml:"Strength" json:"strength,omitempty"`
	DrugDBCode  *Coded       `xml:"DrugDBCode" json:"drug_db_code,omitempty"`
	DEASchedule *DEASchedule `xml:"DEASchedule" json:"dea_schedule,omitempty"`
}

type EffectiveDate

type EffectiveDate struct {
	*DateTime
	Date *Date `xml:"Date" json:"date,omitempty"`
}

type Facility

type Facility struct {
	Identification       PayerIdentification  `xml:"Identification" json:"identification,omitempty"`
	FacilityName         string               `xml:"FacilityName" json:"facility_name,omitempty"`
	Address              Address              `xml:"Address" json:"address,omitempty"`
	CommunicationNumbers CommunicationNumbers `xml:"CommunicationNumbers" json:"communication_numbers,omitempty"`
}

type Fax

type Fax struct {
	XMLName xml.Name `xml:"Fax" json:"-"`
	Number  string   `xml:"Number" json:"number,omitempty"`
}

type Frequency

type Frequency struct {
	FrequencyNumericValue int           `xml:"FrequencyNumericValue" json:"frequency_numeric_value,omitempty"`
	FrequencyUnits        UnitOfMeasure `xml:"FrequencyUnits" json:"frequency_units,omitempty"`
}
type Header struct {
	XMLName               xml.Name          `xml:"Header" json:"-"`
	To                    QualifierRef      `xml:"To" json:"to,omitempty"`
	From                  QualifierRef      `xml:"From" json:"from,omitempty"`
	MessageID             string            `xml:"MessageID" json:"message_id,omitempty"`
	RelatesToMessageID    string            `xml:"RelatesToMessageID" json:"relates_to_message_id,omitempty"`
	SentTime              time.Time         `xml:"SentTime" json:"sent_time,omitempty"`
	Security              Security          `xml:"Security" json:"security,omitempty"`
	SenderSoftware        SenderSoftware    `xml:"SenderSoftware" json:"sender_software,omitempty"`
	Mailbox               *Mailbox          `xml:"Mailbox" json:"mailbox,omitempty"`
	TestMessage           *bool             `xml:"TestMessage" json:"test_message,omitempty"`
	RxReferenceNumber     *string           `xml:"RxReferenceNumber" json:"rx_reference_number,omitempty"`
	PrescriberOrderNumber string            `xml:"PrescriberOrderNumber" json:"prescriber_order_number,omitempty"`
	DigitalSignature      *DigitalSignature `xml:"DigitalSignature" json:"digital_signature,omitempty"`
}

type HumanPatient

type HumanPatient struct {
	XMLName              xml.Name               `xml:"HumanPatient" json:"-"`
	Identification       *PatientIdentification `xml:"Identification" json:"identification,omitempty"`
	Name                 Name                   `xml:"Name" json:"name,omitempty"`
	Gender               string                 `xml:"Gender" json:"gender,omitempty"`
	DateOfBirth          DateOfBirth            `xml:"DateOfBirth" json:"date_of_birth,omitempty"`
	Address              Address                `xml:"Address" json:"address,omitempty"`
	CommunicationNumbers CommunicationNumbers   `xml:"CommunicationNumbers" json:"communication_numbers,omitempty"`
	LanguageNameCode     string                 `xml:"LanguageNameCode" json:"language_name_code,omitempty"`
}

type Instruction

type Instruction struct {
	DoseAdministration DoseAdministration  `xml:"DoseAdministration" json:"dose_administration,omitempty"`
	TimingAndDuration  []TimingAndDuration `xml:"TimingAndDuration" json:"timing_and_duration,omitempty"`
}

type LastFillDate

type LastFillDate struct {
	*DateTime
	Date *Date `xml:"Date" json:"date,omitempty"`
}

type Loinc

type Loinc struct {
	LoincNum                  string `csv:"LOINC_NUM"`
	Component                 string `csv:"COMPONENT"`
	Property                  string `csv:"PROPERTY"`
	TimeAspect                string `csv:"TIME_ASPCT"`
	System                    string `csv:"SYSTEM"`
	ScaleTyp                  string `csv:"SCALE_TYP"`
	MethodTyp                 string `csv:"METHOD_TYP"`
	Class                     string `csv:"CLASS"`
	VersionLastChanged        string `csv:"VersionLastChanged"`
	ChngType                  string `csv:"CHNG_TYPE"`
	DefinitionDescription     string `csv:"DefinitionDescription"`
	Status                    string `csv:"STATUS"`
	ConsumerName              string `csv:"CONSUMER_NAME"`
	ClassType                 string `csv:"CLASSTYPE"`
	Formula                   string `csv:"FORMULA"`
	ExmplAnswers              string `csv:"EXMPL_ANSWERS"`
	SurveryQuestText          string `csv:"SURVEY_QUEST_TEXT"`
	SurveyQuestSrc            string `csv:"SURVEY_QUEST_SRC"`
	UnitsRequired             string `csv:"UNITSREQUIRED"`
	SubmittedUnits            string `csv:"SUBMITTED_UNITS"`
	RelatedNames2             string `csv:"RELATEDNAMES2"`
	ShortName                 string `csv:"SHORTNAME"`
	OrderObs                  string `csv:"ORDER_OBS"`
	CDISCCommonTests          string `csv:"CDISC_COMMON_TESTS"`
	HL7FieldSubfieldID        string `csv:"HL7_FIELD_SUBFIELD_ID"`
	ExternalCopyrightNotice   string `csv:"EXTERNAL_COPYRIGHT_NOTICE"`
	ExampleUnits              string `csv:"EXAMPLE_UNITS"`
	LongCommonName            string `csv:"LONG_COMMON_NAME"`
	UnitsAndRange             string `csv:"UnitsAndRange"`
	ExampleUCUMUnits          string `csv:"EXAMPLE_UCUM_UNITS"`
	ExampleSiUCUMUnits        string `csv:"EXAMPLE_SI_UCUM_UNITS"`
	StatusReason              string `csv:"STATUS_REASON"`
	StatusText                string `csv:"STATUS_TEXT"`
	ChangeReasonPublic        string `csv:"CHANGE_REASON_PUBLIC"`
	CommonTestRank            string `csv:"COMMON_TEST_RANK"`
	CommonOrderRank           string `csv:"COMMON_ORDER_RANK"`
	CommonSiTestRank          string `csv:"COMMON_SI_TEST_RANK"`
	HL7AttachmentStructure    string `csv:"HL7_ATTACHMENT_STRUCTURE"`
	ExternalCopyrightLink     string `csv:"EXTERNAL_COPYRIGHT_LINK"`
	PanelType                 string `csv:"PanelType"`
	AskAtOrderEntry           string `csv:"AskAtOrderEntry"`
	AssociatedObservations    string `csv:"AssociatedObservations"`
	VersionFirstReleased      string `csv:"VersionFirstReleased"`
	ValidHL7AttachmentRequest string `csv:"ValidHL7AttachmentRequest"`
	DisplayName               string `csv:"DisplayName"`
}

type LoincData

type LoincData []*Loinc

func LoadLoinc

func LoadLoinc(r io.Reader) (*LoincData, error)

func (*LoincData) Len added in v1.0.0

func (l *LoincData) Len() int

type Mailbox

type Mailbox struct {
	XMLName           xml.Name `xml:"Mailbox" json:"-"`
	DeliveredID       *string  `xml:"DeliveredID" json:"delivered_id,omitempty"`
	AcknowledgementID *string  `xml:"AcknowledgementID" json:"acknowledgement_id,omitempty"`
}

type Measurement

type Measurement struct {
	VitalSign       string           `xml:"VitalSign" json:"vital_sign,omitempty"`
	LOINCVersion    string           `xml:"LOINCVersion" json:"loinc_version,omitempty"`
	Value           string           `xml:"Value" json:"value,omitempty"`
	UnitOfMeasure   string           `xml:"UnitOfMeasure" json:"unit_of_measure,omitempty"`
	UCUMVersion     string           `xml:"UCUMVersion" json:"ucum_version,omitempty"`
	ObservationDate *ObservationDate `xml:"ObservationDate" json:"observation_date,omitempty"`
}

type Medication

type Medication struct {
	DrugDescription           string               `xml:"DrugDescription" json:"drug_description,omitempty"`
	DrugCoded                 DrugCoded            `xml:"DrugCoded" json:"drug_coded,omitempty"`
	Quantity                  Quantity             `xml:"Quantity" json:"quantity,omitempty"`
	DaysSupply                float64              `xml:"DaysSupply" json:"days_supply,omitempty"`
	WrittenDate               WrittenDate          `xml:"WrittenDate" json:"written_date,omitempty"`
	LastFillDate              *LastFillDate        `xml:"LastFillDate" json:"last_fill_date,omitempty"`
	Substitutions             *int                 `xml:"Substitutions" json:"substitutions,omitempty"`
	NumberOfRefills           *int                 `xml:"NumberOfRefills" json:"number_of_refills,omitempty"`
	Diagnosis                 []Diagnosis          `xml:"Diagnosis" json:"diagnosis,omitempty"`
	Note                      string               `xml:"Note" json:"note,omitempty"`
	Sig                       Sig                  `xml:"Sig" json:"sig,omitempty"`
	RxFillIndicator           string               `xml:"RxFillIndicator" json:"rx_fill_indicator,omitempty"`
	PriorAuthorizationStatus  string               `xml:"PriorAuthorizationStatus" json:"prior_authorization_status,omitempty"`
	PrescriberCheckedREMS     string               `xml:"PrescriberCheckedREMS" json:"prescriber_checked_rems,omitempty"`
	OfficeOfPharmacyAffairsID string               `xml:"OfficeOfPharmacyAffairsID" json:"office_of_pharmacy_affairs_id,omitempty"`
	OtherMedicationDate       *OtherMedicationDate `xml:"OtherMedicationDate" json:"other_medication_date,omitempty"`
	PharmacyRequestedRefills  int                  `xml:"PharmacyRequestedRefills" json:"pharmacy_requested_refills,omitempty"`
}

type Message

type Message struct {
	XMLName            xml.Name `xml:"Message" json:"-"`
	DatatypesVersion   string   `xml:"DatatypesVersion,attr" json:"datatypes_version,omitempty"`
	TransportVersion   string   `xml:"TransportVersion,attr" json:"transport_version,omitempty"`
	TransactionDomain  string   `xml:"TransactionDomain,attr" json:"transaction_domain,omitempty"`
	TransactionVersion string   `xml:"TransactionVersion,attr" json:"transaction_version,omitempty"`
	StructuresVersion  string   `xml:"StructuresVersion,attr" json:"structures_version,omitempty"`
	ECLVersion         string   `xml:"ECLVersion,attr" json:"ecl_version,omitempty"`
	Header             Header   `xml:"Header" json:"header,omitempty"`
	Body               Body     `xml:"Body" json:"body,omitempty"`
}

type Name

type Name struct {
	FirstName  string  `xml:"FirstName" json:"first_name,omitempty"`
	MiddleName *string `xml:"MiddleName" json:"middle_name,omitempty"`
	LastName   string  `xml:"LastName" json:"last_name,omitempty"`
	Prefix     string  `xml:"Prefix" json:"prefix,omitempty"`
	Suffix     string  `xml:"Suffix" json:"suffix,omitempty"`
}

type NewRx

type NewRx struct {
	XMLName               xml.Name               `xml:"NewRx" json:"-"`
	AllergyOrAdverseEvent *AllergyOrAdverseEvent `xml:"AllergyOrAdverseEvent" json:"allergy_or_adverse_event,omitempty"`
	BenefitsCoordination  *BenefitsCoordination  `xml:"BenefitsCoordination" json:"benefits_coordination,omitempty"`
	Patient               Patient                `xml:"Patient" json:"patient,omitempty"`
	Pharmacy              Pharmacy               `xml:"Pharmacy" json:"pharmacy,omitempty"`
	Prescriber            Prescriber             `xml:"Prescriber" json:"prescriber,omitempty"`
	Observation           *Observation           `xml:"Observation" json:"observation,omitempty"`
	MedicationPrescribed  Medication             `xml:"MedicationPrescribed" json:"medication_prescribed,omitempty"`
}

type NonVeterinarian

type NonVeterinarian struct {
	XMLName              xml.Name               `xml:"NonVeterinarian" json:"-"`
	Identification       ProviderIdentification `xml:"Identification" json:"identification,omitempty"`
	Specialty            string                 `xml:"Specialty" json:"specialty,omitempty"`
	PracticeLocation     *PracticeLocation      `xml:"PracticeLocation" json:"practice_location,omitempty"`
	Name                 Name                   `xml:"Name" json:"name,omitempty"`
	Address              Address                `xml:"Address" json:"address,omitempty"`
	PrescriberAgent      *PrescriberAgent       `xml:"PrescriberAgent" json:"prescriber_agent,omitempty"`
	CommunicationNumbers CommunicationNumbers   `xml:"CommunicationNumbers" json:"communication_numbers,omitempty"`
}

type Observation

type Observation struct {
	Measurement []Measurement `xml:"Measurement" json:"measurement,omitempty"`
}

type ObservationDate

type ObservationDate struct {
	*DateTime
	Date *Date `xml:"Date" json:"date,omitempty"`
}

type OtherMedicationDate

type OtherMedicationDate struct {
	OtherMedicationDate2         *OtherMedicationDate2 `xml:"OtherMedicationDate" json:"other_medication_date,omitempty"`
	OtherMedicationDateQualifier string                `xml:"OtherMedicationDateQualifier" json:"other_medication_date_qualifier,omitempty"`
}

type OtherMedicationDate2

type OtherMedicationDate2 struct {
	Date Date `xml:"Date" json:"date,omitempty"`
}

type Password

type Password struct {
	Value string `xml:",chardata"`
	Type  string `xml:"Type,attr"`
}

type Patient

type Patient struct {
	XMLName      xml.Name     `xml:"Patient" json:"-"`
	HumanPatient HumanPatient `xml:"HumanPatient" json:"human_patient,omitempty"`
}

type PatientIdentification

type PatientIdentification struct {
	MedicalRecordIdentificationNumberEHR *string `xml:"MedicalRecordIdentificationNumberEHR" json:"medical_record_identification_number_ehr,omitempty"`
	SocialSecurity                       *string `xml:"SocialSecurity" json:"social_security,omitempty"`
}

type PayerIdentification

type PayerIdentification struct {
	MutuallyDefined               string `xml:"MutuallyDefined" json:"mutually_defined,omitempty"`
	IINNumber                     string `xml:"IINNumber" json:"iin_number,omitempty"`
	PayerID                       string `xml:"PayerID" json:"payer_id,omitempty"`
	ProcessorIdentificationNumber string `xml:"ProcessorIdentificationNumber" json:"processor_identification_number,omitempty"`
}

type Pharmacist

type Pharmacist struct {
	Name Name `xml:"Name" json:"name,omitempty"`
}

type Pharmacy

type Pharmacy struct {
	XMLName              xml.Name               `xml:"Pharmacy" json:"-"`
	Identification       ProviderIdentification `xml:"Identification" json:"identification,omitempty"`
	Pharmacist           *Pharmacist            `xml:"Pharmacist" json:"pharmacist,omitempty"`
	BusinessName         string                 `xml:"BusinessName" json:"business_name,omitempty"`
	Address              Address                `xml:"Address" json:"address,omitempty"`
	CommunicationNumbers CommunicationNumbers   `xml:"CommunicationNumbers" json:"communication_numbers,omitempty"`
}

type PracticeLocation

type PracticeLocation struct {
	XMLName      xml.Name `xml:"PracticeLocation" json:"-"`
	BusinessName string   `xml:"BusinessName" json:"business_name,omitempty"`
}

type Prescriber

type Prescriber struct {
	XMLName         xml.Name        `xml:"Prescriber" json:"-"`
	NonVeterinarian NonVeterinarian `xml:"NonVeterinarian" json:"non_veterinarian,omitempty"`
}

type PrescriberAgent

type PrescriberAgent struct {
	Name Name `xml:"Name" json:"name,omitempty"`
}

type ProviderIdentification

type ProviderIdentification struct {
	XMLName            xml.Name `xml:"Identification" json:"-"`
	NCPDPID            string   `xml:"NCPDPID" json:"ncpdpid,omitempty"`
	NPI                string   `xml:"NPI" json:"npi,omitempty"`
	DEANumber          string   `xml:"DEANumber" json:"dea_number,omitempty"`
	StateLicenseNumber string   `xml:"StateLicenseNumber" json:"state_license_number,omitempty"`
}

type QualifierRef

type QualifierRef struct {
	Value     string `xml:",chardata" json:"value,omitempty"`
	Qualifier string `xml:"Qualifier,attr" json:"qualifier,omitempty"`
}

type Quantity

type Quantity struct {
	Value                 float64       `xml:"Value" json:"value,omitempty"`
	CodeListQualifier     string        `xml:"CodeListQualifier" json:"code_list_qualifier,omitempty"`
	QuantityUnitOfMeasure UnitOfMeasure `xml:"QuantityUnitOfMeasure" json:"quantity_unit_of_measure,omitempty"`
}

type Reason

type Reason struct {
	ReasonCode      *string `xml:"ReasonCode" json:"reason_code,omitempty"`
	ReferenceNumber *string `xml:"ReferenceNumber" json:"reference_number,omitempty"`
	DenialReason    *string `xml:"DenialReason" json:"denial_reason,omitempty"`
}

type Response

type Response struct {
	Approved            *Reason   `xml:"Approved" json:"approved,omitempty"`
	Replace             *struct{} `xml:"Replace" json:"replace,omitempty"`
	ApprovedWithChanges *struct{} `xml:"ApprovedWithChanges" json:"approved_with_changes,omitempty"`
	Denied              *Reason   `xml:"Denied" json:"denied,omitempty"`
}

type RxRenewalRequest

type RxRenewalRequest struct {
	XMLName                xml.Name   `xml:"RxRenewalRequest" json:"-"`
	RequestReferenceNumber *string    `xml:"RequestReferenceNumber" json:"request_reference_number,omitempty"`
	Patient                Patient    `xml:"Patient" json:"patient,omitempty"`
	Pharmacy               Pharmacy   `xml:"Pharmacy" json:"pharmacy,omitempty"`
	Prescriber             Prescriber `xml:"Prescriber" json:"prescriber,omitempty"`
	MedicationDispensed    Medication `xml:"MedicationDispensed" json:"medication_dispensed,omitempty"`
	MedicationPrescribed   Medication `xml:"MedicationPrescribed" json:"medication_prescribed,omitempty"`
}

type RxRenewalResponse

type RxRenewalResponse struct {
	XMLName                xml.Name               `xml:"RxRenewalResponse" json:"-"`
	RequestReferenceNumber *string                `xml:"RequestReferenceNumber" json:"request_reference_number,omitempty"`
	Response               *Response              `xml:"Response" json:"response,omitempty"`
	AllergyOrAdverseEvent  *AllergyOrAdverseEvent `xml:"AllergyOrAdverseEvent" json:"allergy_or_adverse_event,omitempty"`
	Facility               *Facility              `xml:"Facility" json:"facility,omitempty"`
	Patient                Patient                `xml:"Patient" json:"patient,omitempty"`
	Pharmacy               Pharmacy               `xml:"Pharmacy" json:"pharmacy,omitempty"`
	Prescriber             Prescriber             `xml:"Prescriber" json:"prescriber,omitempty"`
	Supervisor             *Supervisor            `xml:"Supervisor" json:"supervisor,omitempty"`
	Observation            *Observation           `xml:"Observation" json:"observation,omitempty"`
	MedicationResponse     Medication             `xml:"MedicationResponse" json:"medication_response,omitempty"`
}

type Security

type Security struct {
	XMLName       xml.Name                `xml:"Security" json:"-"`
	Sender        *TertiaryIdentification `xml:"Sender" json:"sender,omitempty"`
	Receiver      *TertiaryIdentification `xml:"Receiver" json:"receiver,omitempty"`
	UsernameToken *UsernameToken          `xml:"UsernameToken" json:"username_token,omitempty"`
}

type SenderSoftware

type SenderSoftware struct {
	XMLName                      xml.Name `xml:"SenderSoftware" json:"-"`
	SenderSoftwareDeveloper      string   `xml:"SenderSoftwareDeveloper" json:"sender_software_developer,omitempty"`
	SenderSoftwareProduct        string   `xml:"SenderSoftwareProduct" json:"sender_software_product,omitempty"`
	SenderSoftwareVersionRelease string   `xml:"SenderSoftwareVersionRelease" json:"sender_software_version_release,omitempty"`
}

type Sig

type Sig struct {
	SigText     string       `xml:"SigText" json:"sig_text,omitempty"`
	CodeSystem  *CodeSystem  `xml:"CodeSystem" json:"code_system,omitempty"`
	Instruction *Instruction `xml:"Instruction" json:"instruction,omitempty"`
}

type Strength

type Strength struct {
	StrengthValue         string         `xml:"StrengthValue" json:"strength_value,omitempty"`
	StrengthForm          *UnitOfMeasure `xml:"StrengthForm" json:"strength_form,omitempty"`
	StrengthUnitOfMeasure *UnitOfMeasure `xml:"StrengthUnitOfMeasure" json:"strength_unit_of_measure,omitempty"`
}

type Supervisor

type Supervisor struct {
	XMLName         xml.Name        `xml:"Supervisor" json:"-"`
	NonVeterinarian NonVeterinarian `xml:"NonVeterinarian" json:"non_veterinarian,omitempty"`
}

type Telephone

type Telephone struct {
	Number      string `xml:"Number" json:"number,omitempty"`
	SupportsSMS string `xml:"SupportsSMS" json:"supports_sms,omitempty"`
}

type Terminologies

type Terminologies []*Terminology

func LoadTerminology

func LoadTerminology(r io.Reader) (*Terminologies, error)

func (Terminologies) FindTermByQuantityUnitOfMeasureCode

func (t Terminologies) FindTermByQuantityUnitOfMeasureCode(s string) string

func (*Terminologies) Len added in v1.0.0

func (t *Terminologies) Len() int

type Terminology

type Terminology struct {
	NCItSubsetCode      string
	SubsetPreferredTerm string
	NCItCode            string
	PreferredTerm       string
	Synonym             string
	NCItPreferredTerm   string
	NCItDefinition      string
}

type TertiaryIdentification

type TertiaryIdentification struct {
	TertiaryIdentification string `xml:"TertiaryIdentification" json:"tertiary_identification,omitempty"`
}

type TimingAndDuration

type TimingAndDuration struct {
	Frequency            *Frequency            `xml:"Frequency" json:"frequency,omitempty"`
	AdministrationTiming *AdministrationTiming `xml:"AdministrationTiming" json:"administration_timing,omitempty"`
}

type UnitOfMeasure

type UnitOfMeasure struct {
	Text      *string `xml:"Text" json:"text,omitempty"`
	Qualifier *string `xml:"Qualifier" json:"qualifier,omitempty"`
	Code      *string `xml:"Code" json:"code,omitempty"`
}

type UsernameToken

type UsernameToken struct {
	Username string    `xml:"Username" json:"username,omitempty"`
	Password Password  `xml:"Password" json:"password,omitempty"`
	Nonce    string    `xml:"Nonce" json:"nonce,omitempty"`
	Created  time.Time `xml:"Created" json:"created,omitempty"`
}

type Verify

type Verify struct {
	XMLName      xml.Name `xml:"Verify" json:"-"`
	VerifyStatus *Coded   `xml:"VerifyStatus" json:"verify_status,omitempty"`
}

type WrittenDate

type WrittenDate struct {
	*DateTime
	Date *Date `xml:"Date" json:"date,omitempty"`
}

Jump to

Keyboard shortcuts

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