Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Azure AI - Health Insights] - Typespec revision for Health Insights API Version 2 #27223

Merged
merged 44 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0612b51
Health Insights API Version 2
asaflevi-ms Jan 2, 2024
4d34e35
add custom_words
asaflevi-ms Jan 2, 2024
1655036
update radiology insights doc descriptions
asaflevi-ms Jan 16, 2024
1b644ad
misspell
asaflevi-ms Jan 16, 2024
9366183
add java service-name option to emit the service name
asaflevi-ms Jan 16, 2024
222579b
update openAPI spec. misspell
asaflevi-ms Jan 24, 2024
1441e71
Merge branch 'main' into asaflevi/healthinsights-api-v2
asaflevi-ms Jan 24, 2024
8e8031c
model is Element instead of extends element
asaflevi-ms Jan 24, 2024
3fadaf0
Fhir.R4 namespace as PascalCase
asaflevi-ms Jan 24, 2024
a5bbaa7
Fix: workaround - force order resolution
asaflevi-ms Jan 25, 2024
15e7609
fix: suppression to get additionalProperties. DomainResource is Resource
asaflevi-ms Jan 25, 2024
80a8ba9
suppress in patient timeline to get additionalProperties
asaflevi-ms Jan 25, 2024
c9279c7
Merge branch 'main' into asaflevi/healthinsights-api-v2
asaflevi-ms Jan 26, 2024
ddd0683
[Health Insights] Project structure updates (#27545)
catalinaperalta Jan 28, 2024
8e60753
use clientName decorator to decorate Fhir_R4 models
asaflevi-ms Jan 28, 2024
be562d0
Operation types as camelCase
asaflevi-ms Jan 28, 2024
052157e
replace projectedName with clientName
asaflevi-ms Jan 29, 2024
87b3ac5
model extends Element - same as FHIR spec
asaflevi-ms Jan 29, 2024
d3d52ce
move clientName to client.tsp
asaflevi-ms Jan 29, 2024
02b71b5
fix: clientName - typename
asaflevi-ms Jan 29, 2024
0b71a89
fix: token-expected: ';'
asaflevi-ms Jan 29, 2024
ebd3455
remove import, typespec-client-generator-core
asaflevi-ms Jan 29, 2024
34e9852
tsp format
asaflevi-ms Jan 29, 2024
8617dea
fix: LRO response schema to include result
asaflevi-ms Jan 29, 2024
e6d4e5c
add @clientName to all models
asaflevi-ms Jan 29, 2024
4dfb2ef
replace decimal with decimal128, add RI sample
asaflevi-ms Jan 29, 2024
c074001
replace decimal128 with float64
asaflevi-ms Jan 29, 2024
a4993c5
tsp format
asaflevi-ms Jan 29, 2024
e4f5c39
suppress AvoidAnonymousTypes
catalinaperalta Jan 29, 2024
bb11fb7
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
catalinaperalta Jan 30, 2024
73d40cf
comment clientName decorators
asaflevi-ms Jan 30, 2024
a739963
Merge branch 'asaflevi/healthinsights-api-v2' of https://github.com/A…
asaflevi-ms Jan 30, 2024
ce51886
comment clientName decorators
asaflevi-ms Jan 30, 2024
a6506bb
comment clientName decorator for RI client.tsp
asaflevi-ms Jan 30, 2024
47934ed
Add projectedName
asaflevi-ms Jan 30, 2024
f13f11d
Merge branch 'main' into asaflevi/healthinsights-api-v2
asaflevi-ms Jan 30, 2024
5390ee3
move projectedName to client.tsp
asaflevi-ms Jan 30, 2024
bce8324
fix: projectedName on client
asaflevi-ms Jan 30, 2024
da323e9
updat tspconfig.yaml
catalinaperalta Jan 30, 2024
7242cf2
move service.tsp
catalinaperalta Jan 31, 2024
c25d6a3
update ref
catalinaperalta Jan 31, 2024
e734ee1
revert structure changes
catalinaperalta Jan 31, 2024
b0a9a26
move examples
catalinaperalta Jan 31, 2024
9e1bfd7
tspconfig
catalinaperalta Jan 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3957,3 +3957,7 @@ protobuf
proto
msvideo
SOQL
retroperitoneal
codeable
telehealth
loinc
Original file line number Diff line number Diff line change
@@ -0,0 +1,375 @@

using TypeSpec.Rest;

namespace FHIR.R4;

alias markdown = string;

@pattern("([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?")
scalar fhirDate extends string;

@pattern("([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]{1,9})?)?)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)?)?)?")
scalar fhirDateTime extends string;

@pattern("([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]{1,9})?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))")
scalar fhirInstant extends string;

scalar fhirUri extends string;

alias value_x = {
@doc("Value as Quantity")
valueQuantity?: Quantity;

@doc("Value as CodeableConcept")
valueCodeableConcept?: CodeableConcept;

@doc("Value as string")
valueString?: string;

@doc("Value as boolean")
valueBoolean?: boolean;

@doc("Value as integer")
valueInteger?: integer;

@doc("Value as Range.")
valueRange?: Range;

@doc("Value as Ratio.")
valueRatio?: Ratio;

@doc("Value as SampledData.")
valueSampledData?: SampledData;

@doc("Value as time (hh:mm:ss)")
valueTime?: plainTime;

@doc("Value as dateTime.")
valueDateTime?: fhirDateTime;

@doc("Value as Period.")
valuePeriod?: Period;

@doc("Value as reference.")
valueReference?: Reference;
};

@doc("""
Base for all elements
Based on [FHIR Element](https://www.hl7.org/fhir/datatypes.html#Element)
""")
model Extension extends Element {
@doc("Source of the definition for the extension code - a logical name or a URL.")
url: fhirUri;

...value_x;
}

@doc("FHIR extendible element")
model Extendible {
@doc("Additional Content defined by implementations")
extension?: Extension[];
}

@doc("""
The base definition for all elements contained inside a resource.
Based on [FHIR Element](https://www.hl7.org/fhir/R4/element.html)
""")
model Element {
@doc("Unique id for inter-element referencing")
id?: string;

@doc("Additional Content defined by implementations")
extension?: Extension[];
}

@doc("""
A Coding is a representation of a defined concept using a symbol from a defined "code system".
Based on [FHIR Coding](https://www.hl7.org/fhir/R4/datatypes.html#Coding)
""")
model Coding extends Element {
@doc("Identity of the terminology system")
system?: fhirUri;

@doc("Version of the system - if relevant")
version?: string;

@doc("Symbol in syntax defined by the system")
code?: string;

@doc("Representation defined by the system")
display?: string;
}

@doc("""
Concept - reference to a terminology or just text
Based on [FHIR CodeableConcept](https://www.hl7.org/fhir/R4/datatypes.html#CodeableConcept)
""")
model CodeableConcept extends Element {
@doc("Code defined by a terminology system")
coding?: Array<Coding>;

@doc("Plain text representation of the concept")
text?: string;
}

alias canonical = fhirUri;

@doc("""
Metadata about a resource
Based on [FHIR Meta](https://www.hl7.org/fhir/R4/resource.html#Meta)
""")
model Meta {
@doc("The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.")
versionId?: string;

@doc("When the resource last changed - e.g. when the version changed.")
lastUpdated?: fhirInstant;

@doc("A uri that identifies the source system of the resource. This provides a minimal amount of Provenance information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.")
source?: fhirUri;

@doc("A list of profiles (references to [StructureDefinition](https://www.hl7.org/fhir/structuredefinition.html) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](https://www.hl7.org/fhir/structuredefinition-definitions.html#StructureDefinition.url).")
profile?: Array<canonical>;

@doc("Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.")
security?: Array<Coding>;

@doc("Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.")
tag?: Array<Coding>;
}

alias xhtml = string;
@doc("""
Any resource that is a [DomainResource](https://www.hl7.org/fhir/domainresource.html) may include a human-readable narrative that contains a summary of the resource and may be used to represent the content of the resource to a human.
Based on [FHIR Narrative](https://www.hl7.org/fhir/R4/narrative.html#Narrative)
""")
model Narrative extends Element {
@doc("generated, extensions, additional, empty")
status: string;

@doc("xhtml")
div: xhtml;
}

@doc("""
A reference from one resource to another
Based on [FHIR Reference](https://www.hl7.org/fhir/R4/references.html)
""")
model Reference extends Element {
@doc("Literal reference, Relative, internal or absolute URL")
reference?: string;

@doc("Type the reference refers to (e.g. \"Patient\")")
type?: fhirUri;

@doc("Logical reference, when literal reference is not known")
identifier?: Identifier;

@doc("Text alternative for the resource")
display?: string;
}

@doc("""
An identifier intended for computation
Based on [FHIR Identifier](https://www.hl7.org/fhir/R4/identifier.html)
""")
model Identifier extends Element {
@doc("usual | official | temp | secondary | old (If known)")
use?: string;

@doc("Description of identifier")
type?: CodeableConcept;

@doc("The namespace for the identifier value")
system?: fhirUri;

@doc("The value that is unique")
value?: string;

@doc("Time period when id is/was valid for use")
period?: Period;

@doc("Organization that issued id (may be just text)")
assigner?: Reference;
}

@doc("""
A time period defined by a start and end date and optionally time
Based on [FHIR Period](https://www.hl7.org/fhir/R4/datatypes.html#Period)
""")
model Period extends Element {
@doc("Starting time with inclusive boundary")
start?: fhirDateTime;

@doc("End time with inclusive boundary, if not ongoing")
end?: fhirDateTime;
}

@doc("""
A measured or measurable amount
Based on [FHIR Quantity](https://www.hl7.org/fhir/R4/datatypes.html#Quantity)
""")
model Quantity extends Element {
@doc("Numerical value (with implicit precision)")
value?: decimal;

@doc("< | <= | >= | > - how to understand the value")
comparator?: string;

@doc("Unit representation")
unit?: string;

@doc("System that defines coded unit form")
system?: fhirUri;

@doc("Coded form of the unit")
code?: string;
}

@doc("""
A set of ordered Quantities defined by a low and high limit
Based on [FHIR Range](https://www.hl7.org/fhir/R4/datatypes.html#Range)
""")
model Range extends Element {
@doc("Low limit")
low?: Quantity;

@doc("High limit")
high?: Quantity;
}

@doc("""
A ratio of two Quantity values - a numerator and a denominator
Based on [FHIR Ratio](https://www.hl7.org/fhir/R4/datatypes.html#Ratio)
""")
model Ratio extends Element {
@doc("Numerator value")
numerator?: Quantity;

@doc("Denominator value")
denominator?: Quantity;
}

@doc("""
A text note which also contains information about who made the statement and when
Based on [FHIR Annotation](https://www.hl7.org/fhir/R4/datatypes.html#Annotation)
""")
model Annotation extends Element {
@doc("Individual responsible for the annotation")
authorString?: string;

@doc("When the annotation was made")
time?: fhirDateTime;

@doc("The annotation - text content (as markdown)")
text: string;
}

@doc("""
A series of measurements taken by a device
Based on [FHIR SampledData](https://www.hl7.org/fhir/R4/datatypes.html#SampledData)
""")
model SampledData extends Element {
@doc("Zero value and units")
origin: Quantity;

@doc("Number of milliseconds between samples")
period: decimal;

@doc("Multiply data by this before adding to origin")
factor?: decimal;

@doc("Lower limit of detection")
lowerLimit?: decimal;

@doc("Upper limit of detection")
upperLimit?: decimal;

@doc("Number of sample points at each time point")
@minValue(1)
dimensions: int32;

@doc("Decimal values with spaces, or \"E\" | \"U\" | \"L\"")
data?: string;
}

@doc("""
Contact details (See: https://www.hl7.org/fhir/R4/metadatatypes.html#ContactDetail)
""")
model ContactDetail extends Element {
@doc("Name of an individual to contact")
name?: string;

@doc("Contact details for individual or organization")
telecom?: Array<ContactPoint>;
}

@doc("""
Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
See https://www.hl7.org/fhir/R4/datatypes.html#ContactPoint
""")
model ContactPoint {
@doc("phone | fax | email | pager | url | sms | other")
system?: ContactPointSystem;

@doc("The actual contact point details")
value?: string;

@doc("home | work | temp | old | mobile - purpose of this contact point")
use?: ContactPointUse;

@doc("Specify preferred order of use (1 = highest)")
rank?: int32;

@doc("Time period when the contact point was/is in use")
period?: Period;
}

@doc("""
Contact Point System
see https://www.hl7.org/fhir/R4/valueset-contact-point-system.html
""")
enum ContactPointSystem {
@doc("Phone")
Phone: "phone",

@doc("Fax")
Fax: "fax",

@doc("Email")
Email: "email",

@doc("Pager")
Pager: "pager",

@doc("Url")
Url: "url",

@doc("Sms")
Sms: "sms",

@doc("Other")
Other: "other",
}

@doc("""
Contact Point Use
See: http://hl7.org/fhir/ValueSet/contact-point-use
""")
enum ContactPointUse {
@doc("Home")
Home: "home",

@doc("Work")
Work: "work",

@doc("Temp")
Temp: "temp",

@doc("Old")
Old: "old",

@doc("Mobile")
Mobile: "mobile",
}
Loading
Loading