-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Support Polymorphic Data Elements
- Loading branch information
1 parent
4dbe742
commit 7e79427
Showing
456 changed files
with
4,857 additions
and
1,571 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2019 - 2022 The Samply Community | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package fhir | ||
|
||
// THIS FILE IS GENERATED BY https://github.com/samply/golang-fhir-models | ||
// PLEASE DO NOT EDIT BY HAND | ||
|
||
// Address is documented here http://hl7.org/fhir/StructureDefinition/Address | ||
type Address struct { | ||
Id *string `bson:"id,omitempty" json:"id,omitempty"` | ||
Extension []Extension `bson:"extension,omitempty" json:"extension,omitempty"` | ||
Use *AddressUse `bson:"use,omitempty" json:"use,omitempty"` | ||
Type *AddressType `bson:"type,omitempty" json:"type,omitempty"` | ||
Text *string `bson:"text,omitempty" json:"text,omitempty"` | ||
Line []string `bson:"line,omitempty" json:"line,omitempty"` | ||
City *string `bson:"city,omitempty" json:"city,omitempty"` | ||
District *string `bson:"district,omitempty" json:"district,omitempty"` | ||
State *string `bson:"state,omitempty" json:"state,omitempty"` | ||
PostalCode *string `bson:"postalCode,omitempty" json:"postalCode,omitempty"` | ||
Country *string `bson:"country,omitempty" json:"country,omitempty"` | ||
Period *Period `bson:"period,omitempty" json:"period,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// Copyright 2019 - 2022 The Samply Community | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package fhir | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"strings" | ||
) | ||
|
||
// THIS FILE IS GENERATED BY https://github.com/samply/golang-fhir-models | ||
// PLEASE DO NOT EDIT BY HAND | ||
|
||
// AddressType is documented here http://hl7.org/fhir/ValueSet/address-type | ||
type AddressType int | ||
|
||
const ( | ||
AddressTypePostal AddressType = iota | ||
AddressTypePhysical | ||
AddressTypeBoth | ||
) | ||
|
||
func (code AddressType) MarshalJSON() ([]byte, error) { | ||
return json.Marshal(code.Code()) | ||
} | ||
func (code *AddressType) UnmarshalJSON(json []byte) error { | ||
s := strings.Trim(string(json), "\"") | ||
switch s { | ||
case "postal": | ||
*code = AddressTypePostal | ||
case "physical": | ||
*code = AddressTypePhysical | ||
case "both": | ||
*code = AddressTypeBoth | ||
default: | ||
return fmt.Errorf("unknown AddressType code `%s`", s) | ||
} | ||
return nil | ||
} | ||
func (code AddressType) String() string { | ||
return code.Code() | ||
} | ||
func (code AddressType) Code() string { | ||
switch code { | ||
case AddressTypePostal: | ||
return "postal" | ||
case AddressTypePhysical: | ||
return "physical" | ||
case AddressTypeBoth: | ||
return "both" | ||
} | ||
return "<unknown>" | ||
} | ||
func (code AddressType) Display() string { | ||
switch code { | ||
case AddressTypePostal: | ||
return "Postal" | ||
case AddressTypePhysical: | ||
return "Physical" | ||
case AddressTypeBoth: | ||
return "Postal & Physical" | ||
} | ||
return "<unknown>" | ||
} | ||
func (code AddressType) Definition() string { | ||
switch code { | ||
case AddressTypePostal: | ||
return "Mailing addresses - PO Boxes and care-of addresses." | ||
case AddressTypePhysical: | ||
return "A physical address that can be visited." | ||
case AddressTypeBoth: | ||
return "An address that is both physical and postal." | ||
} | ||
return "<unknown>" | ||
} |
Oops, something went wrong.