8000 build: conversiontype required by Orta21 · Pull Request #3884 · metriport/metriport · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

build: conversiontype required #3884

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

Merged
merged 10 commits into from
May 26, 2025
Merged

Conversation

Orta21
Copy link
Member
@Orta21 Orta21 commented May 21, 2025

Part of eng-231

Issues:

Dependencies

  • Upstream: none
  • Downstream: none

Description

  • Make the conversionType mandatory

Testing

  • Local
    • Start consolidated query works as expected
    • Get consolidated query works as expected
    • Get single consolidated query works as expected
  • Staging
    • Start consolidated query works as expected
    • Get consolidated query works as expected
    • Get single consolidated query works as expected
  • Production
    • Start consolidated query works as expected
    • Get consolidated query works as expected
    • Get single consolidated query works as expected

Check each PR.

Release Plan

Will create the alpha packages once approved as to not add more files to the review process

  • Release NPM packages
  • Merge this

Summary by CodeRabbit

  • New Features

    • The conversionType parameter is now required when requesting consolidated patient data and supports "json", "html", or "pdf" formats.
  • Bug Fixes

    • Ensured consistent handling and validation of the conversionType field across all relevant endpoints, request schemas, and internal logic.
  • Documentation

    • Updated endpoint and response documentation to reflect the mandatory conversionType parameter and its supported values.
  • Tests

    • Adjusted test cases and test data to explicitly include the required conversionType parameter.
    • Removed obsolete test verifying behavior with undefined conversionType.

Part of eng-231

Signed-off-by: Jorge Orta <36802074+Orta21@users.noreply.github.com>
Copy link
linear bot commented May 21, 2025

Copy link
coderabbitai bot commented May 21, 2025

Walkthrough

This change enforces that the conversionType parameter or field is required rather than optional across API endpoints, schemas, SDKs, and internal logic. The allowed values for conversionType are expanded to include "json", and related documentation, tests, and examples are updated accordingly. No other logic or endpoint behaviors are altered.

Changes

File(s) / Path(s) Change Summary
docs/_snippets/consolidated-query.mdx Updated documentation to mark the conversionType response field as required instead of optional.
fern/definition/medical/fhir.yml Moved conversionType from request body to required query parameter for startConsolidatedQuery; expanded allowed values to include "json"; updated example.
packages/api-sdk/src/medical/client/metriport.ts Set default value of "json" for the conversionType parameter in startConsolidatedQuery method, ensuring it is always sent unless overridden; updated JSDoc accordingly.
packages/api-sdk/src/medical/models/fhir.ts Made conversionType a required enum (no default) in getConsolidatedFiltersSchema, removing optionality and default assignment.
packages/api/src/command/medical/patient/tests/consolidated-get.test.ts Updated tests to always pass { conversionType: "json" } as options to getCurrentConsolidatedProgress.
packages/api/src/command/medical/patient/tests/store-query-cmd.ts Updated test data and factory function to default conversionType to "json" if not provided.
packages/api/src/command/medical/patient/consolidated-get.ts Removed redundant check for conversionType existence and made conversionType a required parameter in getConsolidatedPatientDataAsync.
packages/api/src/routes/internal/medical/patient.ts Made conversionType a required query parameter for the /internal/patient/consolidated GET endpoint; expanded allowed values to include "json".
packages/api/src/routes/medical/patient.ts Made conversionType a required query parameter for the POST /patient/:id/consolidated/query endpoint; updated documentation and validation accordingly.
packages/core/src/command/consolidated/get-snapshot.ts Made conversionType required in the ConsolidatedSnapshotRequestAsync type.
packages/core/src/command/consolidated/consolidated-get.ts Made conversionType required in the getConsolidatedPatientDataAsync function parameter.
packages/shared/src/interface/internal/consolidated.ts Made conversionType required in the internalSendConsolidatedSchema validation schema.
packages/api/src/command/medical/patient/tests/get-consolidated-webhook.test.ts Removed test case verifying behavior when conversionType is invalid or undefined in getConsolidatedWebhook.
packages/api-sdk/package.json and multiple other package.json files Updated package versions to new alpha pre-release versions and upgraded dependencies to corresponding alpha versions.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API Gateway
    participant Service

    Client->>API Gateway: POST /patient/:id/consolidated/query?conversionType=json
    API Gateway->>Service: Validate required conversionType (json/html/pdf)
    Service-->>API Gateway: Processed consolidated data (format: conversionType)
    API Gateway-->>Client: Response with data or signed URL
Loading

Possibly related PRs

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm warn config production Use --omit=dev instead.
npm error code ERR_SSL_WRONG_VERSION_NUMBER
npm error errno ERR_SSL_WRONG_VERSION_NUMBER
npm error request to https://10.0.0.28:4873/punycode/-/punycode-2.3.1.tgz failed, reason: C0ECA2C8157F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:
npm error
npm error A complete log of this run can be found in: /.npm/_logs/2025-05-26T15_26_26_219Z-debug-0.log


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f51d03 and 786e547.

📒 Files selected for processing (2)
  • packages/api/src/command/medical/patient/consolidated-get.ts (2 hunks)
  • packages/core/src/command/consolidated/consolidated-get.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/api/src/command/medical/patient/consolidated-get.ts
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.ts`: - Use the Onion Pattern to organize a package's code in layers - Try to use immutable code and avoid sharing state across different functions, objects, and systems - Try...

**/*.ts: - Use the Onion Pattern to organize a package's code in layers

  • Try to use immutable code and avoid sharing state across different functions, objects, and systems
  • Try to build code that's idempotent whenever possible
  • Prefer functional programming style functions: small, deterministic, 1 input, 1 output
  • Minimize coupling / dependencies
  • Avoid modifying objects received as parameter
  • Only add comments to code to explain why something was done, not how it works
  • Naming
    • classes, enums: PascalCase
    • constants, variables, functions: camelCase
    • file names: kebab-case
    • table and column names: snake_case
    • Use meaningful names, so whoever is reading the code understands what it means
    • Don’t use negative names, like notEnabled, prefer isDisabled
    • For numeric values, if the type doesn’t convey the unit, add the unit to the name
  • Typescript
    • Use types
    • Prefer const instead of let
    • Avoid any and casting from any to other types
    • Type predicates: only applicable to narrow down the type, not to force a complete type conversion
    • Prefer deconstructing parameters for functions instead of multiple parameters that might be of
      the same type
    • Don’t use null inside the app, only on code interacting with external interfaces/services,
      like DB and HTTP; convert to undefined before sending inwards into the code
    • Use async/await instead of .then()
    • Use the strict equality operator ===, don’t use abstract equality operator ==
    • When calling a Promise-returning function asynchronously (i.e., not awaiting), use .catch() to
      handle errors (see processAsyncError and emptyFunction depending on the case)
    • Date and Time
      • Always use buildDayjs() to create dayjs instances
      • Prefer dayjs.duration(...) to create duration consts and keep them as duration
  • Prefer Nullish Coalesce (??) than the OR operator (||) to provide a default value
  • Avoid creating arrow functions
  • Use truthy syntax instead of in - i.e., if (data.link) not if ('link' in data)
  • Error handling
    • Pass the original error as the new one’s cause so the stack trace is persisted
    • Error messages should have a static message - add dynamic data to MetriportError's additionalInfo prop
    • Avoid sending multiple events to Sentry for a single error
  • Global constants and variables
    • Move literals to constants decla 8000 red after imports when possible (avoid magic numbers)
    • Avoid shared, global objects
  • Avoid using console.log and console.error in packages other than utils, infra and shared,
    and try to use out().log instead
  • Avoid multi-line logs
    • don't send objects as a second parameter to console.log() or out().log()
    • don't create multi-line strings when using JSON.stringify()
  • Use eslint to enforce code style
  • Use prettier to format code
  • max column length is 100 chars
  • multi-line comments use /** */
  • scripts: top-level comments go after the import
  • packages/core/src/command/consolidated/consolidated-get.ts
🧬 Code Graph Analysis (1)
packages/core/src/command/consolidated/consolidated-get.ts (1)
packages/api-sdk/src/medical/models/fhir.ts (1)
  • ConsolidationConversionType (21-21)
⏰ Context from checks skipped due to timeout of 90000ms (14)
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: check-pr / lint-build-test
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
packages/core/src/command/consolidated/consolidated-get.ts (1)

124-124:

✅ Verification successful

LGTM! Proper enforcement of required conversionType parameter.

The change from optional to required conversionType parameter is well-implemented and aligns with the broader codebase update. The function correctly uses the parameter in the payload construction on line 129.

To ensure this breaking change doesn't introduce runtime errors, please verify that all callers of getConsolidatedPatientDataAsync have been updated to provide the conversionType parameter:


🏁 Script executed:

#!/bin/bash
# Description: Verify all function calls to getConsolidatedPatientDataAsync provide conversionType
# Expected: All calls should include conversionType parameter

# Search for function calls to getConsolidatedPatientDataAsync
rg -A 10 -B 2 "getConsolidatedPatientDataAsync"

Length of output: 3488


All callers updated to include required conversionType

Verified that the sole call in packages/api/src/command/medical/patient/consolidated-get.ts passes the conversionType argument:

• packages/api/src/command/medical/patient/consolidated-get.ts:

getConsolidatedPatientDataAsync({
  patient: updatedPatient,
  resources,
  dateFrom,
  dateTo,
  requestId,
  conversionType,    // ✅ present
  fromDashboard,
}).catch(emptyFunction);

No other call sites exist—this breaking change is safe to merge.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@@ -496,7 +496,7 @@ export class MetriportMedicalApi {
resources?: readonly ResourceTypeForConsolidation[],
dateFrom?: string,
dateTo?: string,
conversionType?: string,
conversionType = "json",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason im setting a default value here is because if i make this required without one then it needs to go above the optional params due to our linter. To avoid the breaking change on the sdk for all cxs since this isnt an object will just make the conversionType default to json so the API will always receive a conversionType even if they dont explictly set one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Let's just update the TSDoc, please? It's saying defaults to JSON in the body of the WH request.

@Orta21 Orta21 marked this pull request as ready for review May 21, 2025 21:51
Part of eng-231

Signed-off-by: Jorge Orta <36802074+Orta21@users.noreply.github.com>
Copy link
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 642dd68 and d6e032d.

📒 Files selected for processing (11)
  • docs/_snippets/consolidated-query.mdx (1 hunks)
  • fern/definition/medical/fhir.yml (3 hunks)
  • packages/api-sdk/src/medical/client/metriport.ts (1 hunks)
  • packages/api-sdk/src/medical/models/fhir.ts (1 hunks)
  • packages/api/src/command/medical/patient/__tests__/consolidated-get.test.ts (2 hunks)
  • packages/api/src/command/medical/patient/__tests__/store-query-cmd.ts (2 hunks)
  • packages/api/src/command/medical/patient/consolidated-get.ts (2 hunks)
  • packages/api/src/routes/internal/medical/patient.ts (2 hunks)
  • packages/api/src/routes/medical/patient.ts (2 hunks)
  • packages/core/src/command/consolidated/get-snapshot.ts (1 hunks)
  • packages/shared/src/interface/internal/consolidated.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.ts`: - Use the Onion Pattern to organize a package's code in layers - Try to use immutable code and avoid sharing state across different functions, objects, and systems - Try...

**/*.ts: - Use the Onion Pattern to organize a package's code in layers

  • Try to use immutable code and avoid sharing state across different functions, objects, and systems
  • Try to build code that's idempotent whenever possible
  • Prefer functional programming style functions: small, deterministic, 1 input, 1 output
  • Minimize coupling / dependencies
  • Avoid modifying objects received as parameter
  • Only add comments to code to explain why something was done, not how it works
  • Naming
    • classes, enums: PascalCase
    • constants, variables, functions: camelCase
    • file names: kebab-case
    • table and column names: snake_case
    • Use meaningful names, so whoever is reading the code understands what it means
    • Don’t use negative names, like notEnabled, prefer isDisabled
    • For numeric values, if the type doesn’t convey the unit, add the unit to the name
  • Typescript
    • Use types
    • Prefer const instead of let
    • Avoid any and casting from any to other types
    • Type predicates: only applicable to narrow down the type, not to force a complete type conversion
    • Prefer deconstructing parameters for functions instead of multiple parameters that might be of
      the same type
    • Don’t use null inside the app, only on code interacting with external interfaces/services,
      like DB and HTTP; convert to undefined before sending inwards into the code
    • Use async/await instead of .then()
    • Use the strict equality operator ===, don’t use abstract equality operator ==
    • When calling a Promise-returning function asynchronously (i.e., not awaiting), use .catch() to
      handle errors (see processAsyncError and emptyFunction depending on the case)
    • Date and Time
      • Always use buildDayjs() to create dayjs instances
      • Prefer dayjs.duration(...) to create duration consts and keep them as duration
  • Prefer Nullish Coalesce (??) than the OR operator (||) to provide a default value
  • Avoid creating arrow functions
  • Use truthy syntax instead of in - i.e., if (data.link) not if ('link' in data)
  • Error handling
    • Pass the original error as the new one’s cause so the stack trace is persisted
    • Error messages should have a static message - add dynamic data to MetriportError's additionalInfo prop
    • Avoid sending multiple events to Sentry for a single error
  • Global constants and variables
    • Move literals to constants declared after imports when possible (avoid magic numbers)
    • Avoid shared, global objects
  • Avoid using console.log and console.error in packages other than utils, infra and shared,
    and try to use out().log instead
  • Avoid multi-line logs
    • don't send objects as a second parameter to console.log() or out().log()
    • don't create multi-line strings when using JSON.stringify()
  • Use eslint to enforce code style
  • Use prettier to format code
  • max column length is 100 chars
  • multi-line comments use /** */
  • scripts: top-level comments go after the import
  • packages/api/src/command/medical/patient/__tests__/consolidated-get.test.ts
  • packages/api/src/command/medical/patient/__tests__/store-query-cmd.ts
  • packages/core/src/command/consolidated/get-snapshot.ts
  • packages/api/src/routes/medical/patient.ts
  • packages/api-sdk/src/medical/models/fhir.ts
  • packages/shared/src/interface/internal/consolidated.ts
  • packages/api/src/routes/internal/medical/patient.ts
  • packages/api-sdk/src/medical/client/metriport.ts
  • packages/api/src/command/medical/patient/consolidated-get.ts
🧠 Learnings (2)
packages/api/src/routes/medical/patient.ts (1)
Learnt from: leite08
PR: metriport/metriport#3814
File: packages/api/src/routes/internal/medical/patient-consolidated.ts:141-174
Timestamp: 2025-05-20T21:26:26.804Z
Learning: The functionality introduced in packages/api/src/routes/internal/medical/patient-consolidated.ts is planned to be refactored in downstream PR #3857, including improvements to error handling and validation.
packages/api/src/routes/internal/medical/patient.ts (1)
Learnt from: leite08
PR: metriport/metriport#3814
File: packages/api/src/routes/internal/medical/patient-consolidated.ts:141-174
Timestamp: 2025-05-20T21:26:26.804Z
Learning: The functionality introduced in packages/api/src/routes/internal/medical/patient-consolidated.ts is planned to be refactored in downstream PR #3857, including improvements to error handling and validation.
🧬 Code Graph Analysis (4)
packages/api/src/command/medical/patient/__tests__/consolidated-get.test.ts (1)
packages/api/src/command/medical/patient/consolidated-get.ts (1)
  • getCurrentConsolidatedProgress (169-189)
packages/core/src/command/consolidated/get-snapshot.ts (1)
packages/api-sdk/src/medical/models/fhir.ts (1)
  • ConsolidationConversionType (21-21)
packages/shared/src/interface/internal/consolidated.ts (1)
packages/api-sdk/src/medical/models/fhir.ts (1)
  • consolidationConversionType (20-20)
packages/api/src/command/medical/patient/consolidated-get.ts (1)
packages/api-sdk/src/medical/models/fhir.ts (1)
  • ConsolidationConversionType (21-21)
🪛 GitHub Actions: Fern Check
fern/definition/medical/fhir.yml

[error] 1-1: Unexpected path parameter "conversionType" in service -> endpoints -> startConsolidatedQuery -> examples[0] -> path-parameters.


[error] 1-1: Example is missing required query parameter "conversionType" in service -> endpoints -> startConsolidatedQuery -> examples[0] -> query-parameters.

🔇 Additional comments (17)
docs/_snippets/consolidated-query.mdx (1)

21-23: Field correctly marked as required.

The documentation has been updated to indicate that conversionType is now a required field, which aligns with the PR goal of making this parameter mandatory across the codebase.

packages/api-sdk/src/medical/models/fhir.ts (1)

27-27: Schema updated to make conversionType required.

The change correctly removes optionality from the conversionType field in the validation schema, properly enforcing it as a required parameter with values constrained to the allowed enum types.

packages/shared/src/interface/internal/consolidated.ts (1)

8-8: Internal schema updated to require conversionType.

This change properly aligns the internal schema validation with the PR objective of making conversionType a required field, ensuring consistency across different parts of the application.

packages/core/src/command/consolidated/get-snapshot.ts (1)

17-17: Type definition updated to require conversionType.

The type definition for ConsolidatedSnapshotRequestAsync now correctly marks conversionType as a required property, maintaining type safety and consistency with the other changes in this PR.

packages/api/src/command/medical/patient/__tests__/store-query-cmd.ts (2)

38-38: Added required conversionType field to test data

The addition of the "json" conversion type to the test data is consistent with making this field required. This matches the schema changes in the PR that make this field mandatory across the codebase.


61-61: Added default value for conversionType in factory function

Good implementation of a fallback value with the nullish coalescing operator, following the coding guidelines for providing default values. This ensures backwards compatibility while making the field effectively required.

packages/api/src/command/medical/patient/__tests__/consolidated-get.test.ts (2)

33-35: Updated test to include required conversionType parameter

This test update correctly reflects the new requirement for conversionType to be explicitly specified. The change maintains test coverage while adapting to the updated function signature.


72-74: Added required conversionType field to test parameters

This change properly updates the test to include the now-required conversionType parameter, keeping test coverage intact while adapting to the updated API contract.

packages/api/src/routes/internal/medical/patient.ts (2)

673-674: Updated JSDoc to document conversionType as required

The JSDoc update correctly indicates that the conversionType parameter is now required, and clarifies the accepted values include "json" along with "pdf" and "html". This provides clear documentation for API users.


687-688: Enforced required conversionType parameter

The implementation now properly requires the conversionType parameter by using orFail() instead of optional(). This change enforces the new contract consistently with the documentation.

fern/definition/medical/fhir.yml (2)

12-20: Reformatted API documentation for clarity

The documentation updates maintain the same meaning while improving readability through better line breaks and formatting.


36-39: Made conversionType a required query parameter

The API specification now correctly defines conversionType as a required query parameter, adding proper documentation that explains it accepts "json", "html", or "pdf".

packages/api/src/routes/medical/patient.ts (2)

291-293: Documentation properly updated to reflect required parameter

The JSDoc comment has been correctly updated to indicate that conversionType is now a required parameter, with clear documentation about the accepted values and the webhook payload behavior.


310-313: Implementation correctly enforces required parameter

The implementation has been updated to use orFail instead of optional when retrieving the conversionType parameter, ensuring it's always provided. The value is then correctly validated using the schema.

packages/api-sdk/src/medical/client/metriport.ts (1)

499-499: Good approach to backward compatibility

Setting a default value of "json" for conversionType is a smart way to make the parameter required without breaking existing client code. This ensures the API always receives a valid value even if clients don't explicitly set one.

packages/api/src/command/medical/patient/consolidated-get.ts (2)

277-277: Simplified condition assuming required parameter

The condition has been simplified by removing the redundant existence check for conversionType, which is appropriate since this parameter is now required throughout the codebase.


446-446: Function signature updated to reflect required parameter

The function signature now correctly indicates that conversionType is a required parameter, aligning with other changes in the codebase that make this field mandatory.

Part of eng-231

Signed-off-by: Jorge Orta <36802074+Orta21@users.noreply.github.com>
Copy link
Member
@leite08 leite08 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the comment on the TSDoc, other than that it looks solid!

@leite08
Copy link
Member
leite08 commented May 22, 2025

Forgot to mention, but when we change docs it's a good idea to put some screenshots to help reviewers to see how it renders w/o having to run it locally.

@Orta21
Copy link
Member Author
Orta21 commented May 22, 2025
Screenshot 2025-05-22 at 9 58 10 AM

Orta21 added 3 commits May 22, 2025 09:59
Part of eng-231

Signed-off-by: Jorge Orta <36802074+Orta21@users.noreply.github.com>
Ref: #000

 - api@1.27.4-alpha.0
 - @metriport/api-sdk@14.14.4-alpha.0
 - @metriport/carequality-cert-runner@1.18.4-alpha.0
 - @metriport/carequality-sdk@1.6.4-alpha.0
 - @metriport/commonwell-cert-runner@1.26.4-alpha.0
 - @metriport/commonwell-jwt-maker@1.24.4-alpha.0
 - @metriport/commonwell-sdk@5.9.2-alpha.0
 - @metriport/core@1.24.4-alpha.0
 - @metriport/ihe-gateway-sdk@0.19.4-alpha.0
 - infrastructure@1.22.4-alpha.0
 - mllp-server@0.3.4-alpha.0
 - @metriport/shared@0.23.4-alpha.0
 - utils@1.25.4-alpha.0

Signed-off-by: Jorge Orta <36802074+Orta21@users.noreply.github.com>
Ref: #000

 - api@1.27.5-alpha.0
 - @metriport/api-sdk@14.14.5-alpha.0
 - @metriport/carequality-cert-runner@1.18.5-alpha.0
 - @metriport/carequality-sdk@1.6.5-alpha.0
 - @metriport/commonwell-cert-runner@1.26.5-alpha.0
 - @metriport/commonwell-jwt-maker@1.24.5-alpha.0
 - @metriport/commonwell-sdk@5.9.3-alpha.0
 - @metriport/core@1.24.5-alpha.0
 - @metriport/ihe-gateway-sdk@0.19.5-alpha.0
 - infrastructure@1.22.5-alpha.0
 - mllp-server@0.3.5-alpha.0
 - @metriport/shared@0.23.5-alpha.0
 - utils@1.25.5-alpha.0

Signed-off-by: Jorge Orta <36802074+Orta21@users.noreply.github.com>
@@ -1,6 +1,6 @@
{
"name": "@metriport/api-sdk",
"version": "14.14.3",
"version": "14.14.5-alpha.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be major, it's a breaking change since one can't trigger consolidated w/o conversion type.

Comment on lines 21 to 23
<ResponseField name="conversionType" type="string" required>
The format of the resulting data. Can be one of `pdf`, `html`, or `json`.
</ResponseField>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't be better to move this upwards close to the other required fields?

Orta21 added 2 commits May 22, 2025 11:44
Part of eng-231

Signed-off-by: Jorge Orta <36802074+Orta21@users.noreply.github.com>
Ref: #000

 - @metriport/api-sdk@15.0.0-alpha.0

Signed-off-by: Jorge Orta <36802074+Orta21@users.noreply.github.com>
Orta21 added 2 commits May 26, 2025 11:10
Part of eng-231

Signed-off-by: Jorge Orta <36802074+Orta21@users.noreply.github.com>
Part of eng-231

Signed-off-by: Jorge Orta <36802074+Orta21@users.noreply.github.com>
@Orta21 Orta21 added this pull request to the merge queue May 26, 2025
Merged via the queue into develop with commit 02331a5 May 26, 2025
37 checks passed
@Orta21 Orta21 deleted the eng-231-conversion-type-required branch May 26, 2025 15:35
@Orta21 Orta21 mentioned this pull request May 26, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0