Client SDK v2.0.0

ICD-10 Codes Service

This guide explains how to consume the underlying Resolution Engine (via the JsonWS proxy) to integrate deterministic medical logic directly into your frontend applications.

1. Quick Start

Include the necessary proxy scripts and the CareCascade validation layer in your document head.

index.html
<script src="//static.buffa.ly/js/JsonMethod.js?v=2"></script>
<script src="//static.buffa.ly/js/validators.js?v=2"></script>
<script src="/JsonWS/Buffaly.MedOnt.Icd10CodesService.ashx.js"></script>
<script src="Icd10.js"></script>

Instantiate the engine proxy when ready:

const icd10Service = new Icd10CodesServiceService();

2. Resolution Methods

RECOMMENDED

The Icd10.js wrapper builds on the generated JsonWS proxy to expose modern, promise-based helpers via the global object.

searchWithHierarchy(term)

Returns the node plus its parent lineage to visualize inheritance.

const withHierarchy = await Icd10CodesService.searchWithHierarchy("Hypertension");
console.log(withHierarchy);
getCodeDetails(code)

Resolves specific node attributes and policy flags.

const details = await Icd10CodesService.getCodeDetails("E11.9");
console.log(details);
getSpecialtyCapability(code)

Checks capability requirements for a specific diagnostic code.

const specialty = await Icd10CodesService.getSpecialtyCapability("E11.9");
console.log(specialty);

3. Custom Configuration

For enterprise deployments, you may need to point to a private instance or provide a custom auth token.

const svc = new Icd10CodesServiceClient({
  baseUrl : "/api/medont/icd10-codes-service", // default
  authToken: sessionStorage.getItem("jwt") // optional header
});

4. Direct Proxy Invocation

If you prefer not to use the helper wrapper, you can invoke the JsonWS proxy directly. Note that this requires manual Promise wrapping.

const icd10Service = new Icd10CodesServiceService();

const result = await new Promise(resolve => {
  icd10Service.GetICDCodesBySearch("Diabetes", resolve);
});

console.log(result);