Documentation ¶
Index ¶
- Variables
- func ConvertToConditionalUpdates(bundle *models.Bundle) error
- type Allergy
- type CodeMap
- type CodeObject
- type CodedResult
- type Condition
- type Encounter
- type Entry
- type Immunization
- type Medication
- type Patient
- type PhysicalQuantityResult
- type Procedure
- type ResultValue
- type TemporallyIdentified
- type UnixTime
- type VitalSign
Constants ¶
This section is empty.
Variables ¶
View Source
var CodeSystemMap = map[string]string{
"CPT": "http://www.ama-assn.org/go/cpt",
"LOINC": "http://loinc.org",
"SNOMED-CT": "http://snomed.info/sct",
"RxNorm": "http://www.nlm.nih.gov/research/umls/rxnorm",
"ICD-9-CM": "http://hl7.org/fhir/sid/icd-9",
"ICD-10-CM": "http://hl7.org/fhir/sid/icd-10",
"ICD-9-PCS": "http://hl7.org/fhir/sid/icd-9",
"ICD-10-PCS": "http://hl7.org/fhir/sid/icd-10",
"NDC": "http://www.fda.gov/Drugs/InformationOnDrugs",
"CVX": "http://www2a.cdc.gov/vaccines/iis/iisstandards/vaccines.asp?rpt=cvx",
"HCP": "urn:oid:2.16.840.1.113883.6.14",
"HCPCS": "urn:oid:2.16.840.1.113883.6.285",
"HL7 Marital Status": "http://hl7.org/fhir/ValueSet/v3-MaritalStatus",
"HITSP C80 Observation Status": "http://hl7.org/fhir/ValueSet/v3-ObservationInterpretation",
"NCI Thesaurus": "urn:oid:2.16.840.1.113883.3.26.1.1",
"FDA SPL": "urn:oid:2.16.840.1.113883.3.26.1.1",
"FDA": "urn:oid:2.16.840.1.113883.3.88.12.80.20",
"UNII": "http://fdasis.nlm.nih.gov",
"HL7 ActStatus": "http://hl7.org/fhir/ValueSet/v3-ActStatus",
"HL7 Healthcare Service Location": "urn:oid:2.16.840.1.113883.6.259",
"HSLOC": "urn:oid:2.16.840.1.113883.6.259",
"DischargeDisposition": "urn:oid:2.16.840.1.113883.12.112",
"HL7 Act Code": "http://hl7.org/fhir/ValueSet/v3-ActCode",
"HL7 Relationship Code": "urn:oid:2.16.840.1.113883.1.11.18877",
"CDC Race": "urn:oid:2.16.840.1.113883.6.238",
"NLM Mesh": "urn:oid:2.16.840.1.113883.6.177",
"Religious Affiliation": "http://hl7.org/fhir/ValueSet/v3-ReligiousAffiliation",
"HL7 ActNoImmunicationReason": "urn:oid:2.16.840.1.113883.1.11.19717",
"NUBC": "urn:oid:2.16.840.1.113883.3.88.12.80.33",
"HL7 Observation Interpretation": "urn:oid:2.16.840.1.113883.1.11.78",
"Source of Payment Typology": "urn:oid:2.16.840.1.113883.3.221.5",
"SOP": "urn:oid:2.16.840.1.113883.3.221.5",
"CDT": "urn:oid:2.16.840.1.113883.6.13",
"AdministrativeSex": "urn:oid:2.16.840.1.113883.18.2",
}
Functions ¶
func ConvertToConditionalUpdates ¶
ConvertToConditionalUpdates converts a bundle containing POST requests to a bundle with PUT requests using conditional updates. For patient resources, the update is based on the Medical Record Number. For all other resources it is based on reasonable indicators of sameness (such as equal dates and codes).
Types ¶
type Allergy ¶
type Allergy struct { Entry Reaction *CodeObject `json:"reaction"` Severity *CodeObject `json:"severity"` }
func (*Allergy) FHIRModels ¶
func (a *Allergy) FHIRModels() []interface{}
type CodeMap ¶
func (*CodeMap) FHIRCodeableConcept ¶
func (c *CodeMap) FHIRCodeableConcept(text string) *fhir.CodeableConcept
type CodeObject ¶
func (*CodeObject) FHIRCodeableConcept ¶
func (c *CodeObject) FHIRCodeableConcept(text string) *fhir.CodeableConcept
type CodedResult ¶
type Condition ¶
type Condition struct { Entry // NOTE: HDS has inconsistent representations of severity, but the only working importer (cat1) // models it like a CodeMap -- so that's what we assume. Note the difference from Allergy. Severity CodeMap `json:"severity"` }
func (*Condition) FHIRModels ¶
func (c *Condition) FHIRModels() []interface{}
type Encounter ¶
type Encounter struct { Entry Reason *Entry `json:"reason"` DischargeDisposition *CodeObject `json:"dischargeDisposition"` }
func (*Encounter) FHIRModels ¶
func (e *Encounter) FHIRModels() []interface{}
type Entry ¶
type Entry struct { TemporallyIdentified Patient *Patient `json:"-"` StartTime *UnixTime `json:"start_time"` EndTime *UnixTime `json:"end_time"` Time *UnixTime `json:"time"` Oid string `json:"oid"` Codes CodeMap `json:"codes"` MoodCode string `json:"mood_code"` NegationInd bool `json:"negationInd"` NegationReason *CodeObject `json:"negationReason"` StatusCode CodeMap `json:"status_code"` Description string `json:"description"` }
func (*Entry) GetFHIRPeriod ¶
type Immunization ¶
func (*Immunization) FHIRModels ¶
func (i *Immunization) FHIRModels() []interface{}
type Medication ¶
type Medication struct {
Entry
}
func (*Medication) FHIRModels ¶
func (m *Medication) FHIRModels() []interface{}
type Patient ¶
type Patient struct { TemporallyIdentified MedicalRecordNumber string `json:"medical_record_number"` FirstName string `json:"first"` LastName string `json:"last"` BirthTime *UnixTime `json:"birthdate"` Gender string `json:"gender"` Encounters []*Encounter `json:"encounters"` Conditions []*Condition `json:"conditions"` VitalSigns []*VitalSign `json:"vital_signs"` Procedures []*Procedure `json:"procedures"` Medications []*Medication `json:"medications"` Immunizations []*Immunization `json:"immunizations"` Allergies []*Allergy `json:"allergies"` }
func (*Patient) FHIRModels ¶
func (p *Patient) FHIRModels() []interface{}
func (*Patient) FHIRTransactionBundle ¶
FHIRTransactionBundle returns a FHIR bundle representing a transaction to post all patient data to a server
func (*Patient) MatchingEncounterReference ¶
func (*Patient) UnmarshalJSON ¶
type PhysicalQuantityResult ¶
Result Types
type Procedure ¶
type Procedure struct { Entry AnatomicalTarget *CodeObject `json:"anatomical_target"` Values []ResultValue `json:"values"` }
func (*Procedure) FHIRModels ¶
func (p *Procedure) FHIRModels() []interface{}
type ResultValue ¶
type ResultValue struct { TemporallyIdentified Physical *PhysicalQuantityResult Coded *CodedResult }
func (*ResultValue) FHIRModels ¶
func (v *ResultValue) FHIRModels() []interface{}
func (*ResultValue) UnmarshalJSON ¶
func (v *ResultValue) UnmarshalJSON(data []byte) (err error)
type TemporallyIdentified ¶
type TemporallyIdentified struct {
// contains filtered or unexported fields
}
func (*TemporallyIdentified) FHIRReference ¶
func (t *TemporallyIdentified) FHIRReference() *fhir.Reference
func (*TemporallyIdentified) GetTempID ¶
func (t *TemporallyIdentified) GetTempID() string
type UnixTime ¶
type UnixTime int64
func NewUnixTime ¶
func (*UnixTime) FHIRDate ¶
func (t *UnixTime) FHIRDate() *fhir.FHIRDateTime
func (*UnixTime) FHIRDateTime ¶
func (t *UnixTime) FHIRDateTime() *fhir.FHIRDateTime
type VitalSign ¶
type VitalSign struct { Entry Description string `json:"description"` Interpretation *CodeObject `json:"interpretation"` Values []ResultValue `json:"values"` }
func (*VitalSign) FHIRModels ¶
func (v *VitalSign) FHIRModels() []interface{}
Click to show internal directories.
Click to hide internal directories.