mastering bridging
This commit is contained in:
71
internal/model/allergancytoleran.go
Normal file
71
internal/model/allergancytoleran.go
Normal file
@@ -0,0 +1,71 @@
|
||||
package model
|
||||
|
||||
type AllergancyToleranRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier []*IdentifierObject `json:"identifier"`
|
||||
ClinicalStatus *ClinicalStatusObject `json:"clinicalStatus"`
|
||||
VerificationStatus *ClinicalStatusObject `json:"verificationStatus"`
|
||||
Category []string `json:"category"`
|
||||
Code *CodeObject `json:"code"`
|
||||
Patient *PatientObject `json:"patient"`
|
||||
Encounter *PatientObject `json:"encounter"`
|
||||
RecordedDate string `json:"recordedDate"`
|
||||
Recorder *PatientObject `json:"recorder"`
|
||||
}
|
||||
|
||||
type AllergancyToleranResponse struct {
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier []*IdentifierObject `json:"identifier"`
|
||||
ClinicalStatus *ClinicalStatusObject `json:"clinicalStatus"`
|
||||
VerificationStatus *ClinicalStatusObject `json:"verificationStatus"`
|
||||
Category []string `json:"category"`
|
||||
Code *CodeObject `json:"code"`
|
||||
Patient *PatientObject `json:"patient"`
|
||||
Encounter *PatientObject `json:"encounter"`
|
||||
RecordedDate string `json:"recordedDate"`
|
||||
Recorder *PatientObject `json:"recorder"`
|
||||
ID string `json:"id"`
|
||||
Meta *MetaObject `json:"meta"`
|
||||
Issue []*IssuerObject `json:"issue`
|
||||
}
|
||||
|
||||
type IdentifierObject struct {
|
||||
System string `json:"system"`
|
||||
Use string `json:"use"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
type ClinicalStatusObject struct {
|
||||
Coding []*CodingObject `json:"coding"`
|
||||
}
|
||||
|
||||
type CodeObject struct {
|
||||
Coding []*CodingObject `json:"coding"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
type PatientObject struct {
|
||||
Reference string `json:"reference"`
|
||||
Display string `json:"display"`
|
||||
}
|
||||
|
||||
type CodingObject struct {
|
||||
System string `json:"system"`
|
||||
Code string `json:"code"`
|
||||
Display string `json:"display"`
|
||||
}
|
||||
|
||||
type MetaObject struct {
|
||||
VersionId string `json:"versionId"`
|
||||
LastUpdated string `json:"lastUpdated"`
|
||||
}
|
||||
|
||||
type IssuerObject struct {
|
||||
Saverity string `json:"severity"`
|
||||
Code string `json:"code"`
|
||||
Details *DetailObject `json:"details"`
|
||||
}
|
||||
type DetailObject struct {
|
||||
Text string `json:"text"`
|
||||
}
|
||||
16
internal/model/careplan.go
Normal file
16
internal/model/careplan.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package model
|
||||
|
||||
type CarePlanRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Status string `json:"status" binding:"required"`
|
||||
Intent string `json:"intent" binding:"required"`
|
||||
Category []Category `json:"category" binding:"required"`
|
||||
Title string `json:"title" binding:"required"`
|
||||
Description string `json:"description" binding:"required"`
|
||||
Subject Reference `json:"subject" binding:"required"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
Created string `json:"created" binding:"required"`
|
||||
Author Reference `json:"author" binding:"required"`
|
||||
Goal []Reference `json:"goal"`
|
||||
}
|
||||
56
internal/model/clinicalImpression.go
Normal file
56
internal/model/clinicalImpression.go
Normal file
@@ -0,0 +1,56 @@
|
||||
package model
|
||||
|
||||
// Reference to another FHIR resource
|
||||
type Reference struct {
|
||||
Reference string `json:"reference"`
|
||||
Display string `json:"display,omitempty"`
|
||||
}
|
||||
|
||||
// Coding for codeable concepts
|
||||
type Coding struct {
|
||||
System string `json:"system"`
|
||||
Code string `json:"code"`
|
||||
Display string `json:"display"`
|
||||
}
|
||||
|
||||
// CodeableConcept for coded fields
|
||||
type CodeableConcept struct {
|
||||
Coding []Coding `json:"coding"`
|
||||
Text string `json:"text,omitempty"`
|
||||
}
|
||||
|
||||
// Investigation item reference
|
||||
type InvestigationItem struct {
|
||||
Reference string `json:"reference"`
|
||||
}
|
||||
|
||||
// Investigation structure
|
||||
type Investigation struct {
|
||||
Code CodeableConcept `json:"code"`
|
||||
Item []InvestigationItem `json:"item"`
|
||||
}
|
||||
|
||||
// Finding structure
|
||||
type Finding struct {
|
||||
ItemCodeableConcept *CodeableConcept `json:"itemCodeableConcept,omitempty"`
|
||||
ItemReference *Reference `json:"itemReference,omitempty"`
|
||||
}
|
||||
|
||||
// ClinicalImpressionRequest for the request body
|
||||
type ClinicalImpressionRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Status string `json:"status"`
|
||||
Description string `json:"description"`
|
||||
Subject Reference `json:"subject"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
EffectiveDateTime string `json:"effectiveDateTime"`
|
||||
Date string `json:"date"`
|
||||
Assessor Reference `json:"assessor"`
|
||||
Problem []Reference `json:"problem"`
|
||||
Investigation []Investigation `json:"investigation"`
|
||||
Summary string `json:"summary"`
|
||||
Finding []Finding `json:"finding"`
|
||||
PrognosisCodeableConcept []CodeableConcept `json:"prognosisCodeableConcept"`
|
||||
}
|
||||
40
internal/model/composition.go
Normal file
40
internal/model/composition.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package model
|
||||
|
||||
type CompositionRequest struct {
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier Identifier `json:"identifier"`
|
||||
Status string `json:"status"`
|
||||
Category []CodeableConcept `json:"category"`
|
||||
Type CodeableConcept `json:"type"`
|
||||
Subject Reference `json:"subject"`
|
||||
Date string `json:"date"`
|
||||
Title string `json:"title"`
|
||||
Author []Reference `json:"author"`
|
||||
Custodian Reference `json:"custodian"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
Section []SectionRequest `json:"section"`
|
||||
Id string `json:"id,omitempty"`
|
||||
Anamnesis string `json:"anamnesis,omitempty"`
|
||||
PemeriksaanFisik string `json:"pemeriksaanFisik,omitempty"`
|
||||
PemeriksaanPenunjang string `json:"pemeriksaanPenunjang,omitempty"`
|
||||
Medikamentosa string `json:"medikamentosa,omitempty"`
|
||||
LanjutanPenatalaksanaan string `json:"lanjutanPenatalaksanaan,omitempty"`
|
||||
}
|
||||
|
||||
type SectionRequest struct {
|
||||
Title string `json:"title,omitempty"`
|
||||
Code CodeableConcept `json:"code"`
|
||||
Text *SectionText `json:"text,omitempty"`
|
||||
Entry []Reference `json:"entry,omitempty"`
|
||||
Section []SectionRequest `json:"section,omitempty"`
|
||||
}
|
||||
|
||||
type Section struct {
|
||||
Code CodeableConcept `json:"code"`
|
||||
Text SectionText `json:"text"`
|
||||
}
|
||||
|
||||
type SectionText struct {
|
||||
Status string `json:"status"`
|
||||
Div string `json:"div"`
|
||||
}
|
||||
11
internal/model/condition.go
Normal file
11
internal/model/condition.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
type ConditionRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
ClinicalStatus CodeableConcept `json:"clinicalStatus"`
|
||||
Category []CodeableConcept `json:"category"`
|
||||
Code CodeableConcept `json:"code"`
|
||||
Subject Reference `json:"subject"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
}
|
||||
20
internal/model/diagnosisreport.go
Normal file
20
internal/model/diagnosisreport.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
// DiagnosticReportRequest defines the structure for a diagnostic report request
|
||||
type DiagnosticReportRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Status string `json:"status"`
|
||||
Category []CodeableConcept `json:"category"`
|
||||
Code CodeableConcept `json:"code"`
|
||||
Subject Reference `json:"subject"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
EffectiveDateTime string `json:"effectiveDateTime"`
|
||||
Issued string `json:"issued"`
|
||||
Performer []Reference `json:"performer"`
|
||||
Result []Reference `json:"result"`
|
||||
Specimen []Reference `json:"specimen"`
|
||||
BasedOn []Reference `json:"basedOn"`
|
||||
ConclusionCode []CodeableConcept `json:"conclusionCode"`
|
||||
}
|
||||
82
internal/model/encounter.go
Normal file
82
internal/model/encounter.go
Normal file
@@ -0,0 +1,82 @@
|
||||
package model
|
||||
|
||||
type EncounterRequest struct {
|
||||
ResourceType string `json:"resourceType"`
|
||||
Status string `json:"status"`
|
||||
Class Class `json:"class"`
|
||||
Subject Subject `json:"subject"`
|
||||
Participant []Participant `json:"participant"`
|
||||
Period struct {
|
||||
Start string `json:"start"`
|
||||
} `json:"end"`
|
||||
Location []Location `json:"location"`
|
||||
StatusHistory []StatusHistory `json:"statusHistory"`
|
||||
ServiceProvider struct {
|
||||
Reference string `json:"reference"`
|
||||
} `json:"serviceProvider"`
|
||||
Identifier []IdentifierEncounter `json:"identifier"`
|
||||
}
|
||||
|
||||
type Class struct {
|
||||
System string `json:"system"`
|
||||
Code string `json:"code"`
|
||||
Display string `json:"display"`
|
||||
}
|
||||
type Subject struct {
|
||||
Reference string `json:"reference"`
|
||||
Display string `json:"display"`
|
||||
}
|
||||
|
||||
type Participant struct {
|
||||
Type []struct {
|
||||
Coding []Class `json:"coding"`
|
||||
} `json:"type"`
|
||||
Individual Subject `json:"individual"`
|
||||
}
|
||||
|
||||
type Location struct {
|
||||
Location Reference `json:"location"`
|
||||
}
|
||||
|
||||
type StatusHistory struct {
|
||||
Status string `json:"status"`
|
||||
Period struct {
|
||||
Start string `json:"start"`
|
||||
} `json:"period"`
|
||||
}
|
||||
|
||||
type EncounterUpdateRequest struct {
|
||||
ResourceType string `json:"resourceType"`
|
||||
ID string `json:"id"`
|
||||
Status string `json:"status"`
|
||||
Class Class `json:"class"`
|
||||
Subject Subject `json:"subject"`
|
||||
Participant []Participant `json:"participant"`
|
||||
Period Period `json:"period"`
|
||||
Location []Location `json:"location"`
|
||||
StatusHistory []StatusHistory `json:"statusHistory"`
|
||||
ServiceProvider struct {
|
||||
Reference string `json:"reference"`
|
||||
} `json:"serviceProvider"`
|
||||
Identifier []IdentifierEncounter `json:"identifier"`
|
||||
Hospitalization Hospitalization `json:"hospitalization"`
|
||||
Diagnosis []DiagnosisEncounter `json:"diagnosis"`
|
||||
}
|
||||
|
||||
type Hospitalization struct {
|
||||
DischargeDisposition struct {
|
||||
Coding []Class `json:"coding"`
|
||||
Text string `json:"text"`
|
||||
} `json:"dischargeDisposition"`
|
||||
}
|
||||
|
||||
type DiagnosisEncounter struct {
|
||||
Condition Reference `json:"condition"`
|
||||
Use Type `json:"use"`
|
||||
Rank int `json:"rank"`
|
||||
}
|
||||
|
||||
type IdentifierEncounter struct {
|
||||
System string `json:"system"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
30
internal/model/episodeofcare.go
Normal file
30
internal/model/episodeofcare.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package model
|
||||
|
||||
type EpisodeOfCareRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Status string `json:"status"`
|
||||
StatusHistory []StatusHistory `json:"statusHistory,omitempty"`
|
||||
Type []Type `json:"type"`
|
||||
Diagnosis []Diagnosis `json:"diagnosis"`
|
||||
Patient Reference `json:"patient"`
|
||||
ManagingOrganization Reference `json:"managingOrganization"`
|
||||
Period Period `json:"period"`
|
||||
CareManager Reference `json:"careManager"`
|
||||
}
|
||||
|
||||
type Period struct {
|
||||
Start string `json:"start"`
|
||||
End string `json:"end"`
|
||||
}
|
||||
|
||||
type Type struct {
|
||||
Coding []Coding `json:"coding"`
|
||||
}
|
||||
|
||||
type Diagnosis struct {
|
||||
Condition Reference `json:"condition"`
|
||||
Role Type `json:"role,omitempty"`
|
||||
Rank int `json:"rank,omitempty"`
|
||||
}
|
||||
20
internal/model/goal.go
Normal file
20
internal/model/goal.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
type GoalRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
LifecycleStatus string `json:"lifecycleStatus"`
|
||||
Category []Category `json:"category,omitempty"`
|
||||
Description Category `json:"description"`
|
||||
Subject Reference `json:"subject"`
|
||||
Target []GoalTarget `json:"target,omitempty"`
|
||||
StatusDate string `json:"statusDate,omitempty"`
|
||||
ExpressedBy Reference `json:"expressedBy,omitempty"`
|
||||
Addresses []Reference `json:"addresses,omitempty"`
|
||||
}
|
||||
|
||||
type GoalTarget struct {
|
||||
Measure Category `json:"measure,omitempty"`
|
||||
DetailCodeableConcept Category `json:"detailCodeableConcept,omitempty"`
|
||||
DueDate string `json:"dueDate,omitempty"`
|
||||
}
|
||||
31
internal/model/imagingstudy.go
Normal file
31
internal/model/imagingstudy.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package model
|
||||
|
||||
type ImagingStudyRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier []Identifier `json:"identifier" binding:"required"`
|
||||
Status string `json:"status" binding:"required"`
|
||||
Modality []Coding `json:"modality"`
|
||||
Subject Reference `json:"subject" binding:"required"`
|
||||
Started string `json:"started" binding:"required"`
|
||||
BasedOn []Reference `json:"basedOn"` //binding:"required"
|
||||
NumberOfSeries int `json:"numberOfSeries,omitempty"`
|
||||
NumberOfInstances int `json:"numberOfInstances,omitempty"`
|
||||
Series []ImagingStudySeries `json:"series,omitempty"` //binding:"required"
|
||||
}
|
||||
|
||||
type ImagingStudySeries struct {
|
||||
UID string `json:"uid"`
|
||||
Number int `json:"number"`
|
||||
Modality Coding `json:"modality"`
|
||||
NumberOfInstances int `json:"numberOfInstances"`
|
||||
Started string `json:"started"`
|
||||
Instance []ImagingStudySeriesInstance `json:"instance"`
|
||||
}
|
||||
|
||||
type ImagingStudySeriesInstance struct {
|
||||
UID string `json:"uid"`
|
||||
SOPClass Coding `json:"sopClass"`
|
||||
Number int `json:"number"`
|
||||
Title string `json:"title"`
|
||||
}
|
||||
30
internal/model/immunization.go
Normal file
30
internal/model/immunization.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package model
|
||||
|
||||
type ImmunizationRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Status string `json:"status" binding:"required"`
|
||||
VaccineCode CodeableConcept `json:"vaccineCode" binding:"required"`
|
||||
Patient Reference `json:"patient" binding:"required"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
OccurrenceDateTime string `json:"occurrenceDateTime" binding:"required"`
|
||||
ExpirationDate string `json:"expirationDate" binding:"required"`
|
||||
Recorded string `json:"recorded" binding:"required"`
|
||||
PrimarySource bool `json:"primarySource"`
|
||||
Location Reference `json:"location" binding:"required"`
|
||||
LotNumber string `json:"lotNumber" binding:"required"`
|
||||
Route CodeableConcept `json:"route" binding:"required"`
|
||||
DoseQuantity Quantity `json:"doseQuantity" binding:"required"`
|
||||
Performer []Performers `json:"performer" binding:"required"`
|
||||
ReasonCode []CodeableConcept `json:"reasonCode" binding:"required"`
|
||||
ProtocolApplied []ProtocolApplied `json:"protocolApplied" binding:"required"`
|
||||
}
|
||||
|
||||
type Performers struct {
|
||||
Function CodeableConcept `json:"function"`
|
||||
Actor Reference `json:"actor"`
|
||||
}
|
||||
|
||||
type ProtocolApplied struct {
|
||||
DoseNumberPositiveInt int `json:"doseNumberPositiveInt"`
|
||||
}
|
||||
46
internal/model/medicationdispense.go
Normal file
46
internal/model/medicationdispense.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package model
|
||||
|
||||
type MedicationDispenseRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Status string `json:"status" binding:"required"`
|
||||
Category Category `json:"category"`
|
||||
MedicationReference Reference `json:"medicationReference" binding:"required"`
|
||||
Subject Reference `json:"subject" binding:"required"`
|
||||
Context Reference `json:"context"`
|
||||
Performer []Performer `json:"performer"`
|
||||
Location Reference `json:"location" binding:"required"`
|
||||
AuthorizingPrescription []Reference `json:"authorizingPrescription" binding:"required"`
|
||||
Quantity Quantity `json:"quantity" binding:"required"`
|
||||
DaysSupply DaysSupply `json:"daysSupply" binding:"required"`
|
||||
WhenPrepared string `json:"whenPrepared" binding:"required"`
|
||||
WhenHandedOver string `json:"whenHandedOver" binding:"required"`
|
||||
DosageInstruction []Dosage `json:"dosageInstruction"`
|
||||
}
|
||||
|
||||
type DaysSupply struct {
|
||||
Value float64 `json:"value"`
|
||||
Unit string `json:"unit"`
|
||||
System string `json:"system"`
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
type Dosage struct {
|
||||
Sequence *int `json:"sequence,omitempty"`
|
||||
Text string `json:"text"`
|
||||
Timing Timing `json:"timing"`
|
||||
DoseAndRate []DoseAndRate `json:"doseAndRate,omitempty"`
|
||||
}
|
||||
|
||||
type DoseAndRate struct {
|
||||
Type Category `json:"type"`
|
||||
DoseQuantity DoseQuantity `json:"doseQuantity"`
|
||||
}
|
||||
|
||||
type DoseQuantity struct {
|
||||
Value float64 `json:"value"`
|
||||
Unit string `json:"unit"`
|
||||
System string `json:"system"`
|
||||
Code string `json:"code"`
|
||||
}
|
||||
44
internal/model/medicationrequest.go
Normal file
44
internal/model/medicationrequest.go
Normal file
@@ -0,0 +1,44 @@
|
||||
package model
|
||||
|
||||
type MedicationRequestRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
MedicationRequest *MedicationRequest `json:"medicationRequest,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Status string `json:"status" binding:"required"`
|
||||
Intent string `json:"intent" binding:"required"`
|
||||
Category []Category `json:"category"`
|
||||
Priority string `json:"priority" binding:"required"`
|
||||
MedicationReference Reference `json:"medicationReference" binding:"required"`
|
||||
Subject Reference `json:"subject" binding:"required"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
AuthoredOn string `json:"authoredOn"`
|
||||
Requester Reference `json:"requester"`
|
||||
ReasonCode []Category `json:"reasonCode"`
|
||||
CourseOfTherapyType Category `json:"courseOfTherapyType"`
|
||||
DosageInstruction []DosageMR `json:"dosageInstruction"`
|
||||
DispenseRequest DispenseRequest `json:"dispenseRequest" binding:"required"`
|
||||
}
|
||||
|
||||
type DosageMR struct {
|
||||
Sequence int `json:"sequence"`
|
||||
Text string `json:"text"`
|
||||
AdditionalInstruction []AdditionalText `json:"additionalInstruction,omitempty"`
|
||||
PatientInstruction string `json:"patientInstruction,omitempty"`
|
||||
Timing Timing `json:"timing"`
|
||||
Route Category `json:"route,omitempty"`
|
||||
DoseAndRate []DoseAndRate `json:"doseAndRate,omitempty"`
|
||||
}
|
||||
|
||||
type AdditionalText struct {
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
type DispenseRequest struct {
|
||||
DispenseInterval Quantity `json:"dispenseInterval"`
|
||||
ValidityPeriod Period `json:"validityPeriod"`
|
||||
NumberOfRepeatsAllowed int `json:"numberOfRepeatsAllowed"`
|
||||
Quantity Quantity `json:"quantity"`
|
||||
ExpectedSupplyDuration Quantity `json:"expectedSupplyDuration"`
|
||||
Performer Reference `json:"performer"`
|
||||
}
|
||||
60
internal/model/medicationstatement.go
Normal file
60
internal/model/medicationstatement.go
Normal file
@@ -0,0 +1,60 @@
|
||||
package model
|
||||
|
||||
type MedicationStatementRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Contained []Medication `json:"contained" binding:"required"`
|
||||
Status string `json:"status" binding:"required"`
|
||||
Category Category `json:"category"`
|
||||
MedicationReference Reference `json:"medicationReference" binding:"required"`
|
||||
Subject Reference `json:"subject" binding:"required"`
|
||||
Dosage []Dosage `json:"dosage"`
|
||||
EffectiveDateTime string `json:"effectiveDateTime" binding:"required"`
|
||||
DateAsserted string `json:"dateAsserted" binding:"required"`
|
||||
InformationSource Reference `json:"informationSource" binding:"required"`
|
||||
Context Reference `json:"context"`
|
||||
}
|
||||
|
||||
type Medication struct {
|
||||
Code CodeableConcept `json:"code"`
|
||||
Extension []MedicationExtension `json:"extension"`
|
||||
Form CodeableConcept `json:"form"`
|
||||
ID string `json:"id"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Ingredient []MedicationIngredient `json:"ingredient"`
|
||||
Batch MedicationBatch `json:"batch"`
|
||||
Meta Meta `json:"meta"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
type MedicationExtension struct {
|
||||
URL string `json:"url"`
|
||||
ValueCodeableConcept CodeableConcept `json:"valueCodeableConcept"`
|
||||
}
|
||||
|
||||
type MedicationIngredient struct {
|
||||
IsActive bool `json:"isActive"`
|
||||
ItemCodeableConcept CodeableConcept `json:"itemCodeableConcept"`
|
||||
Strength MedicationStrength `json:"strength"`
|
||||
}
|
||||
|
||||
type MedicationStrength struct {
|
||||
Denominator Quantity `json:"denominator"`
|
||||
Numerator Quantity `json:"numerator"`
|
||||
}
|
||||
|
||||
type MedicationBatch struct {
|
||||
LotNumber string `json:"lotNumber"`
|
||||
ExpirationDate string `json:"expirationDate"`
|
||||
}
|
||||
|
||||
type Timing struct {
|
||||
Repeat TimingRepeat `json:"repeat"`
|
||||
}
|
||||
|
||||
type TimingRepeat struct {
|
||||
Frequency int `json:"frequency"`
|
||||
Period float64 `json:"period"`
|
||||
PeriodUnit string `json:"periodUnit"`
|
||||
}
|
||||
33
internal/model/medicine.go
Normal file
33
internal/model/medicine.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package model
|
||||
|
||||
type MedicineKfaRequest struct {
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
ProdustType string `form:"product_type"`
|
||||
Keyword string `form:"keyword"`
|
||||
}
|
||||
|
||||
type MedicineKfaResponse struct {
|
||||
Name string `json:"name"`
|
||||
KfaCode string `json:"kfa_code"`
|
||||
}
|
||||
|
||||
type MedicationRequest struct {
|
||||
ResourceType string `json:"resourceType"`
|
||||
Meta Meta `json:"meta"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Code CodeableConcept `json:"code"`
|
||||
Status string `json:"status"`
|
||||
Manufacturer Reference `json:"manufacturer"`
|
||||
Form CodeableConcept `json:"form"`
|
||||
Extension []ExtensionMedication `json:"extension"`
|
||||
}
|
||||
|
||||
type ExtensionMedication struct {
|
||||
URL string `json:"url"`
|
||||
ValueCodeableConcept CodeableConcept `json:"valueCodeableConcept"`
|
||||
}
|
||||
|
||||
// Shared types Meta, Identifier, Coding, CodeableConcept, Reference, and Extension
|
||||
// are defined in other model files (e.g. patient.go and clinicalImpression.go).
|
||||
// This file intentionally references those types to avoid redeclaration.
|
||||
23
internal/model/oauth_model.go
Normal file
23
internal/model/oauth_model.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package model
|
||||
|
||||
type OauthRequest struct {
|
||||
ClientId string `json:"client_id"`
|
||||
ClientSecret string `json:"client_secret"`
|
||||
}
|
||||
|
||||
type OauthResponse struct {
|
||||
RefreshTokenExpiresIn string `json:"refresh_token_expires_in"`
|
||||
APIProductList string `json:"api_product_list"`
|
||||
APIProductListJson []string `json:"api_product_list_json"`
|
||||
OrganizationName string `json:"organization_name"`
|
||||
DeveloperEmail string `json:"developer.email"`
|
||||
TokenType string `json:"token_type"`
|
||||
IssuedAt string `json:"issued_at"`
|
||||
ClientID string `json:"client_id"`
|
||||
AccessToken string `json:"access_token"`
|
||||
ApplicationName string `json:"application_name"`
|
||||
Scope string `json:"scope"`
|
||||
ExpiresIn string `json:"expires_in"`
|
||||
RefreshCount string `json:"refresh_count"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
24
internal/model/observation.go
Normal file
24
internal/model/observation.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package model
|
||||
|
||||
type Quantity struct {
|
||||
Value float64 `json:"value"`
|
||||
Unit string `json:"unit"`
|
||||
System string `json:"system"`
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
type ObservationRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Status string `json:"status"`
|
||||
Category []CodeableConcept `json:"category"`
|
||||
Code CodeableConcept `json:"code"`
|
||||
Subject Reference `json:"subject"`
|
||||
Performer []Reference `json:"performer"`
|
||||
Specimen *Reference `json:"specimen,omitempty"`
|
||||
BasedOn []Reference `json:"basedOn"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
EffectiveDateTime string `json:"effectiveDateTime"`
|
||||
Issued string `json:"issued"`
|
||||
ValueQuantity *Quantity `json:"valueQuantity,omitempty"`
|
||||
}
|
||||
38
internal/model/organization.go
Normal file
38
internal/model/organization.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package model
|
||||
|
||||
type Telecom struct {
|
||||
System string `json:"system"`
|
||||
Value string `json:"value"`
|
||||
Use string `json:"use"`
|
||||
}
|
||||
|
||||
type AddressExtensionValue struct {
|
||||
Url string `json:"url"`
|
||||
ValueCode string `json:"valueCode,omitempty"`
|
||||
}
|
||||
|
||||
type AddressExtension struct {
|
||||
Url string `json:"url"`
|
||||
Extension []AddressExtensionValue `json:"extension"`
|
||||
}
|
||||
|
||||
type Address struct {
|
||||
Use string `json:"use"`
|
||||
Type string `json:"type"`
|
||||
Line []string `json:"line"`
|
||||
City string `json:"city"`
|
||||
PostalCode string `json:"postalCode"`
|
||||
Country string `json:"country"`
|
||||
Extension []AddressExtension `json:"extension"`
|
||||
}
|
||||
|
||||
type OrganizationRequest struct {
|
||||
ResourceType string `json:"resourceType"`
|
||||
Active bool `json:"active"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Type []CodeableConcept `json:"type"`
|
||||
Name string `json:"name"`
|
||||
Telecom []Telecom `json:"telecom"`
|
||||
Address []Address `json:"address"`
|
||||
PartOf Reference `json:"partOf"`
|
||||
}
|
||||
90
internal/model/patient.go
Normal file
90
internal/model/patient.go
Normal file
@@ -0,0 +1,90 @@
|
||||
package model
|
||||
|
||||
type PatientRequest struct {
|
||||
ResourceType string `json:"resourceType"`
|
||||
Meta Meta `json:"meta"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Active bool `json:"active"`
|
||||
Name []HumanName `json:"name"`
|
||||
Telecom []Identifier `json:"telecom"`
|
||||
Gender string `json:"gender"`
|
||||
BirthDate string `json:"birthDate"`
|
||||
DeceasedBoolean bool `json:"deceasedBoolean"`
|
||||
Address []AddressObject `json:"address"`
|
||||
MaritalStatus MaritalStatus `json:"maritalStatus"`
|
||||
MultipleBirthInteger int `json:"multipleBirthInteger"`
|
||||
Contact []ContactObject `json:"contact"`
|
||||
Communication []CommunicationObject `json:"communication"`
|
||||
Extension []Extension `json:"extension"`
|
||||
}
|
||||
|
||||
type Meta struct {
|
||||
Profile []string `json:"profile"`
|
||||
}
|
||||
type Identifier struct {
|
||||
Use string `json:"use,omitempty"`
|
||||
Type *CodeableConcept `json:"type,omitempty"`
|
||||
System string `json:"system,omitempty"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
type HumanName struct {
|
||||
Use string `json:"use"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
type AddressObject struct {
|
||||
Use string `json:"use"`
|
||||
Line []string `json:"line"`
|
||||
City string `json:"city"`
|
||||
PostalCode string `json:"postalCode"`
|
||||
Country string `json:"country"`
|
||||
Extension []ExtensionObject `json:"extension"`
|
||||
}
|
||||
|
||||
type Extension struct {
|
||||
URL string `json:"url"`
|
||||
Extension []struct {
|
||||
URL string `json:"url"`
|
||||
ValueCode string `json:"valueCode"`
|
||||
} `json:"extension"`
|
||||
}
|
||||
|
||||
type MaritalStatus struct {
|
||||
Coding []struct {
|
||||
System string `json:"system"`
|
||||
Code string `json:"code"`
|
||||
Display string `json:"display"`
|
||||
} `json:"coding"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
type ContactObject struct {
|
||||
Relationship []struct {
|
||||
Coding []struct {
|
||||
System string `json:"system"`
|
||||
Code string `json:"code"`
|
||||
} `json:"coding"`
|
||||
}
|
||||
Name HumanName `json:"name"`
|
||||
Telecom []Identifier `json:"telecom"`
|
||||
}
|
||||
|
||||
type CommunicationObject struct {
|
||||
Language struct {
|
||||
Coding []struct {
|
||||
System string `json:"system"`
|
||||
Code string `json:"code"`
|
||||
Display string `json:"display"`
|
||||
} `json:"coding"`
|
||||
Text string `json:"text"`
|
||||
} `json:"language"`
|
||||
Preferred bool `json:"preferred"`
|
||||
}
|
||||
|
||||
type ExtensionObject struct {
|
||||
URL string `json:"url"`
|
||||
ValueCode *string `json:"valueCode"`
|
||||
ValueAddress *struct {
|
||||
Country string `json:"country"`
|
||||
City string `json:"city"`
|
||||
} `json:"valueAddress"`
|
||||
}
|
||||
1
internal/model/practitioner.go
Normal file
1
internal/model/practitioner.go
Normal file
@@ -0,0 +1 @@
|
||||
package model
|
||||
24
internal/model/procedure.go
Normal file
24
internal/model/procedure.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package model
|
||||
|
||||
type ProcedureRequest struct {
|
||||
ID string `json:"id"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Status string `json:"status"`
|
||||
Category CodeableConcept `json:"category"`
|
||||
Code CodeableConcept `json:"code"`
|
||||
Subject Reference `json:"subject"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
PerformedPeriod Period `json:"performedPeriod"`
|
||||
Performer []Performer `json:"performer"`
|
||||
ReasonCode []CodeableConcept `json:"reasonCode"`
|
||||
BodySite []CodeableConcept `json:"bodySite"`
|
||||
Note []Annotation `json:"note"`
|
||||
}
|
||||
|
||||
type Performer struct {
|
||||
Actor Reference `json:"actor"`
|
||||
}
|
||||
|
||||
type Annotation struct {
|
||||
Text string `json:"text"`
|
||||
}
|
||||
24
internal/model/questionnaireresponse.go
Normal file
24
internal/model/questionnaireresponse.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package model
|
||||
|
||||
type QuestionnaireResponseRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Questionnaire string `json:"questionnaire" binding:"required"`
|
||||
Status string `json:"status" binding:"required"`
|
||||
Subject Reference `json:"subject" binding:"required"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
Authored string `json:"authored" binding:"required"`
|
||||
Author Reference `json:"author" binding:"required"`
|
||||
Source Reference `json:"source" binding:"required"`
|
||||
Item []QRItem `json:"item" binding:"required"`
|
||||
}
|
||||
|
||||
type QRItem struct {
|
||||
LinkID string `json:"linkId"`
|
||||
Text string `json:"text"`
|
||||
Answer []QRAnswer `json:"answer"`
|
||||
}
|
||||
|
||||
type QRAnswer struct {
|
||||
ValueCoding Coding `json:"valueCoding"`
|
||||
}
|
||||
10
internal/model/satusehat_akses.go
Normal file
10
internal/model/satusehat_akses.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package model
|
||||
|
||||
type Akses struct {
|
||||
AuthUrl string
|
||||
BaseUrl string
|
||||
ConsentUrl string
|
||||
KfaUrl string
|
||||
ClientId string
|
||||
ClientSecret string
|
||||
}
|
||||
40
internal/model/servicerequest.go
Normal file
40
internal/model/servicerequest.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package model
|
||||
|
||||
type ServiceRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Status string `json:"status"`
|
||||
Intent string `json:"intent"`
|
||||
Priority string `json:"priority"`
|
||||
Category []Category `json:"category"`
|
||||
Code Code `json:"code"`
|
||||
Subject Reference `json:"subject"`
|
||||
Encounter Reference `json:"encounter"`
|
||||
OccurrenceDateTime string `json:"occurrenceDateTime"`
|
||||
AuthoredOn string `json:"authoredOn"`
|
||||
Requester Reference `json:"requester"`
|
||||
Performer []Reference `json:"performer"`
|
||||
ReasonCode []ReasonCode `json:"reasonCode"`
|
||||
LocationCode []LocationCode `json:"locationCode"`
|
||||
LocationReference []Reference `json:"locationReference"`
|
||||
PatientInstruction string `json:"patientInstruction"`
|
||||
}
|
||||
|
||||
type Category struct {
|
||||
Coding []Coding `json:"coding"`
|
||||
}
|
||||
|
||||
type Code struct {
|
||||
Coding []Coding `json:"coding"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
type ReasonCode struct {
|
||||
Coding []Coding `json:"coding"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
type LocationCode struct {
|
||||
Coding []Coding `json:"coding"`
|
||||
}
|
||||
33
internal/model/specimen.go
Normal file
33
internal/model/specimen.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package model
|
||||
|
||||
type SpecimenRequest struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
ResourceType string `json:"resourceType"`
|
||||
Identifier []Identifier `json:"identifier"`
|
||||
Status string `json:"status"`
|
||||
Type SpecimenType `json:"type"`
|
||||
Collection SpecimenCollection `json:"collection"`
|
||||
Subject Reference `json:"subject"`
|
||||
Request []Reference `json:"request"`
|
||||
ReceivedTime string `json:"receivedTime"`
|
||||
Extension []SpecimenExtension `json:"extension"`
|
||||
}
|
||||
|
||||
type SpecimenType struct {
|
||||
Coding []Coding `json:"coding"`
|
||||
}
|
||||
|
||||
type SpecimenCollection struct {
|
||||
CollectedDateTime string `json:"collectedDateTime"`
|
||||
Extension []SpecimenCollectionExtension `json:"extension"`
|
||||
}
|
||||
|
||||
type SpecimenCollectionExtension struct {
|
||||
URL string `json:"url"`
|
||||
ValueReference Reference `json:"valueReference"`
|
||||
}
|
||||
|
||||
type SpecimenExtension struct {
|
||||
URL string `json:"url"`
|
||||
ValueDateTime string `json:"valueDateTime,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user