Skip to main content

Postman Shared Environment Setup for CareConnect FHIR APIs

This guide provides standardized environment variable names and setup instructions that work across all CareConnect FHIR API tutorials.

Standard Environment Variables

Use these consistent variable names across all your CareConnect Postman environments:

Base Configuration

Variable NameDescriptionExample Value
domainCareConnect domainfhirtest.netsmartcloud.com
tenant_idYour CareConnect tenant IDyour-tenant-id

Authentication URLs

Variable NameDescriptionExample Value
auth_urlOAuth authorization endpointhttps://fhirtest.netsmartcloud.com/auth/your-tenant-id/oauth2/v1/authorize
token_urlOAuth token endpointhttps://fhirtest.netsmartcloud.com/auth/your-tenant-id/oauth2/v1/token

Note: Replace your-tenant-id with your actual tenant ID and update domain for Production environment.

API Base URLs

Variable NameDescriptionExample Value
patient_access_base_urlPatient Access API basehttps://fhirtest.netsmartcloud.com/provider/patient-access/v2/your-tenant-id
practitioner_access_base_urlPractitioner Access API basehttps://fhirtest.netsmartcloud.com/provider/patient-access/v2/your-tenant-id
system_access_base_urlSystem Access API basehttps://fhirtest.netsmartcloud.com/provider/system-access/v2/your-tenant-id
provider_directory_base_urlProvider Directory API basehttps://fhirtest.netsmartcloud.com/payer/provider-directory/v2/your-tenant-id

Note: Postman doesn't support variable references within environment variable values, so these must be complete URLs.

OAuth Configuration

Variable NameDescriptionExample Value
client_idYour OAuth client IDyour-client-id
client_secretYour OAuth client secret (secret type)your-client-secret
redirect_uriOAuth redirect URIhttps://oauth.pstmn.io/v1/callback

Scopes by API Type

Variable NameDescription
patient_scopePatient Access scopes
practitioner_scopePractitioner Access scopes
system_scopeSystem Access scopes

Runtime Variables

Variable NameDescription
access_tokenCurrent OAuth access token
patient_idCurrent patient ID for testing
organization_idCurrent organization ID for testing

Environment Templates

Multi-API Environment

Create one environment that supports all API types:

Environment Name: CareConnect Preview - Multi-API

This approach allows you to switch between different API types by changing the fhir_base_url variable to point to the appropriate base URL.

API-Specific Environments

Alternatively, create separate environments for each API type:

  • CareConnect Preview - Patient Access
  • CareConnect Preview - Practitioner Access
  • CareConnect Preview - System Access
  • CareConnect Preview - Provider Directory
  • CareConnect Preview - Service Discovery

Collection Sharing Strategy

Authorization Configuration by Folder

When sharing collections across different API types, move authorization from collection level to folder level:

Collection Structure (Alphabetically Ordered):

CareConnect Multi-API Collection
├── Discovery APIs (No Auth)
│ ├── Provider Directory
│ │ ├── HealthcareService
│ │ ├── InsurancePlan
│ │ ├── Location
│ │ ├── Organization
│ │ ├── Practitioner
│ │ └── PractitionerRole
│ ├── Service Base URLs
│ └── User Access Brands
├── Patient Access (OAuth - Patient Scopes)
│ ├── Care Management
│ │ ├── CarePlan
│ │ ├── CareTeam
│ │ ├── Encounter
│ │ └── Goal
│ ├── Clinical Data
│ │ ├── AllergyIntolerance
│ │ ├── Condition
│ │ ├── DiagnosticReport
│ │ ├── Immunization
│ │ ├── MedicationRequest
│ │ └── Observation
│ ├── Patient
│ │ ├── Patient Read
│ │ └── Patient Search
│ └── Setup & Configuration
│ ├── CapabilityStatement
│ └── SMART Configuration
├── Practitioner Access (OAuth - User Scopes)
│ ├── Clinical Resources
│ │ ├── Condition
│ │ ├── DiagnosticReport
│ │ ├── MedicationRequest
│ │ └── Observation
│ ├── Patient Management
│ │ ├── Patient Read
│ │ └── Patient Search
│ ├── Provider Resources
│ │ ├── Organization
│ │ ├── Practitioner
│ │ └── PractitionerRole
│ └── Setup & Configuration
│ ├── CapabilityStatement
│ └── SMART Configuration
└── System Access (OAuth - System Scopes)
├── Administrative
│ ├── Coverage
│ ├── Location
│ ├── Organization
│ └── Practitioner
├── Bulk Operations
│ ├── Group Export
│ ├── Patient Export
│ └── System Export
├── Clinical Data
│ ├── Condition
│ ├── DiagnosticReport
│ ├── MedicationRequest
│ └── Observation
├── Patient Resources
│ ├── Patient Read
│ └── Patient Search
└── Setup & Configuration
├── CapabilityStatement
└── SMART Configuration

Authorization Setup:

  1. Collection Level: Set to "No Auth"
  2. API Type Folder Level: Configure OAuth 2.0 for each API type:
    • Discovery APIs Folder: No Auth
    • Patient Access Folder: OAuth 2.0 with {{patient_scope}}
    • Practitioner Access Folder: OAuth 2.0 with {{practitioner_scope}}
    • System Access Folder: OAuth 2.0 Client Credentials with {{system_scope}}
  3. Resource Sub-Folder Level: "Inherit auth from parent"
  4. Request Level: "Inherit auth from parent"

Resource Organization Principles:

  • Alphabetical Ordering: All resources within folders are ordered alphabetically for easy navigation
  • Setup & Configuration: Non-authenticated endpoints (metadata, SMART config)
  • Patient/Patient Management: Core patient resource operations
  • Clinical Data: Patient-specific clinical information (observations, conditions, medications)
  • Care Management: Care coordination resources (care plans, teams, goals)
  • Provider Resources: Practitioner and organization information
  • Administrative: Coverage, locations, and administrative data
  • Bulk Operations: System-level export operations

Naming Convention for Requests:

  • Use consistent naming: [Resource] - [Operation] (e.g., "Patient - Search", "Patient - Read")
  • For search operations: [Resource] - Search (GET), [Resource] - Search (POST)
  • For specific operations: [Resource] - Read by ID, [Resource] - Create, [Resource] - Update

Scope Variables by API Type

Add these scope variables to your shared environment:

patient_scope = launch/patient openid fhirUser offline_access patient/Patient.rs patient/Observation.rs...
practitioner_scope = launch openid fhirUser offline_access user/Patient.rs user/Observation.rs...
system_scope = system/Patient.rs system/Observation.rs system/Organization.rs...

Benefits of Standardization

  1. Reusable Collections - Import requests between different API collections
  2. Consistent Naming - Easier to remember and maintain
  3. Cross-Tutorial Compatibility - Variables work across multiple tutorials
  4. Reduced Setup Time - Copy environment templates instead of recreating
  5. Flexible Authorization - Different auth per folder within same collection
  6. Logical Resource Grouping - Related resources grouped for easier navigation
  7. Scalable Structure - Easy to add new resources to appropriate sub-folders